Python 3 fix

This commit is contained in:
hugovk 2017-03-04 13:52:14 +02:00
parent 0abfa08ff7
commit 4ece1ae78a

View File

@ -10,6 +10,7 @@
#
from . import Image, ImageFile
from ._binary import i8
_handler = None
@ -28,7 +29,7 @@ def register_handler(handler):
# Image adapter
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):