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