Define t variable in a more appropriate place

This commit is contained in:
George Davaris 2015-04-01 10:48:28 +01:00
parent 5a49375d4f
commit 68663ad352

View File

@ -196,13 +196,15 @@ class ImageFile(Image.Image):
except AttributeError:
prefix = b""
# Buffer length read; assign a default value
t = 0
for d, e, o, a in self.tile:
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
seek(o)
try:
d.setimage(self.im, e)
except ValueError:
t = None
continue
b = prefix
t = len(b)