mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Merge pull request #3574 from jdufresne/base-exc
Catch BaseException for resource cleanup handlers
This commit is contained in:
commit
4d1a459fa7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user