Move to python3 style division.

All of these are currently integer division in python2.
This commit is contained in:
Ahmed Charles 2015-10-19 05:26:10 +00:00
parent c8fbd2860d
commit cbe1eefcf0
12 changed files with 18 additions and 9 deletions

View file

@ -135,7 +135,7 @@ class ANSIParser(object):
if convert:
colval = 16 + (red * 36) + (green * 6) + blue
return "\033[%s8;5;%s%s%sm" % (3 + int(background), colval/100, (colval % 100)/10, colval%10)
return "\033[%s8;5;%s%s%sm" % (3 + int(background), colval // 100, (colval % 100) // 10, colval%10)
else:
# xterm256 not supported, convert the rgb value to ansi instead
if red == green and red == blue and red < 2: