mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Use bytes for Python 3. It's just an alias to str in Python 2.
This commit is contained in:
parent
0c1c620e30
commit
8a7974c288
|
@ -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")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user