Use bytes for Python 3. It's just an alias to str in Python 2.

This commit is contained in:
hugovk 2014-05-21 14:35:29 +03:00
parent 0c1c620e30
commit 8a7974c288

View File

@ -302,7 +302,7 @@ class JpegImageFile(ImageFile.ImageFile):
i = i16(s)
else:
# Skip non-0xFF junk
s = "\xff"
s = b"\xff"
continue
if i in MARKER:
@ -320,7 +320,7 @@ class JpegImageFile(ImageFile.ImageFile):
s = self.fp.read(1)
elif i == 0 or i == 0xFFFF:
# padded marker or junk; move on
s = "\xff"
s = b"\xff"
else:
raise SyntaxError("no marker found")