Merge pull request #487 from homm/master

fix UnboundLocalError: local variable 't' referenced before assignment
This commit is contained in:
wiredfool 2014-01-16 11:21:11 -08:00
commit bb449f30ec

View File

@ -229,7 +229,7 @@ class ImageFile(Image.Image):
self.fp = None # might be shared
if (not LOAD_TRUNCATED_IMAGES or t == 0) and not self.map and e < 0:
if not self.map and (not LOAD_TRUNCATED_IMAGES or t == 0) and e < 0:
# still raised if decoder fails to return anything
raise_ioerror(e)