mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 02:03:25 +03:00
Python 3 fix
This commit is contained in:
parent
0abfa08ff7
commit
4ece1ae78a
|
@ -10,6 +10,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
from . import Image, ImageFile
|
from . import Image, ImageFile
|
||||||
|
from ._binary import i8
|
||||||
|
|
||||||
_handler = None
|
_handler = None
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ def register_handler(handler):
|
||||||
# Image adapter
|
# Image adapter
|
||||||
|
|
||||||
def _accept(prefix):
|
def _accept(prefix):
|
||||||
return prefix[0:4] == b"GRIB" and prefix[7] == b'\x01'
|
return prefix[0:4] == b"GRIB" and i8(prefix[7]) == 1
|
||||||
|
|
||||||
|
|
||||||
class GribStubImageFile(ImageFile.StubImageFile):
|
class GribStubImageFile(ImageFile.StubImageFile):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user