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:
wiredfool 2017-06-14 09:17:23 +01:00 committed by GitHub
commit f0c3df04af

View File

@ -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)