Propagage ValueError out, rather than swallowing

This commit is contained in:
wiredfool 2017-03-11 15:34:43 +00:00
parent 38f43c1e5f
commit 40a94d4a42

View File

@ -193,10 +193,7 @@ class ImageFile(Image.Image):
decoder = Image._getdecoder(self.mode, decoder_name,
args, self.decoderconfig)
seek(offset)
try:
decoder.setimage(self.im, extents)
except ValueError:
continue
decoder.setimage(self.im, extents)
if decoder.pulls_fd:
decoder.setfd(self.fp)
status, err_code = decoder.decode(b"")