diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 5c1b2a2a7..c6eb26781 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2663,7 +2663,7 @@ def open(fp, mode="r"): # opening failures that are entirely expected. # logger.debug("", exc_info=True) continue - except Exception: + except BaseException: if exclusive_fp: fp.close() raise