mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-11 17:56:18 +03:00
Merge pull request #487 from homm/master
fix UnboundLocalError: local variable 't' referenced before assignment
This commit is contained in:
commit
bb449f30ec
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user