From d2ce692f67ce00352b3e5cd0d1a886066cc9f55d Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 13 Jun 2017 22:35:12 +0100 Subject: [PATCH] Use code for unknown error when initializing. Any case where we hit the cleanup without otherwise setting err_code is some sort of caught error that we're not considering. May not be possible anymore --- PIL/ImageFile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/ImageFile.py b/PIL/ImageFile.py index 0c7a19194..9ada2f6db 100644 --- a/PIL/ImageFile.py +++ b/PIL/ImageFile.py @@ -178,7 +178,7 @@ class ImageFile(Image.Image): self.map = None self.load_prepare() - err_code = 0 + err_code = -3 # initialize to unknown error if not self.map: # sort tiles in file order self.tile.sort(key=_tilesort)