mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 02:46:18 +03:00
Merge pull request #2363 from SpamExperts/unbound_local_var_fix
Ensure that the `err_code` variable is initialized before using.
This commit is contained in:
commit
f0c3df04af
|
@ -186,7 +186,7 @@ class ImageFile(Image.Image):
|
||||||
self.map = None
|
self.map = None
|
||||||
|
|
||||||
self.load_prepare()
|
self.load_prepare()
|
||||||
|
err_code = -3 # initialize to unknown error
|
||||||
if not self.map:
|
if not self.map:
|
||||||
# sort tiles in file order
|
# sort tiles in file order
|
||||||
self.tile.sort(key=_tilesort)
|
self.tile.sort(key=_tilesort)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user