Python 3 fix

This commit is contained in:
hugovk 2017-03-04 23:28:08 +02:00
parent 5cf56e796f
commit 94c07f68fb

View File

@ -18,7 +18,7 @@
# #
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import o8 from ._binary import i8, o8
__version__ = "0.1" __version__ = "0.1"
@ -58,7 +58,7 @@ class XVThumbImageFile(ImageFile.ImageFile):
s = self.fp.readline() s = self.fp.readline()
if not s: if not s:
raise SyntaxError("Unexpected EOF reading XV thumbnail file") raise SyntaxError("Unexpected EOF reading XV thumbnail file")
if s[0] != b'#': if i8(s[0]) != 35: # ie. when not a comment: '#'
break break
# parse header line (already read) # parse header line (already read)