mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06: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.load_prepare()
|
||||
|
||||
err_code = -3 # initialize to unknown error
|
||||
if not self.map:
|
||||
# sort tiles in file order
|
||||
self.tile.sort(key=_tilesort)
|
||||
|
|
Loading…
Reference in New Issue
Block a user