fix UnboundLocalError: local variable 't' referenced before assignment

This commit is contained in:
homm 2014-01-15 16:55:10 +04:00
parent 145883ef56
commit 0a256f9e56

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)