Catch OSError

This commit is contained in:
Andrew Murray 2021-04-03 09:34:56 +11:00
parent 39fe85f308
commit 3c129142c8

View File

@ -269,4 +269,7 @@ def test_crashes(test_file):
with open(test_file, "rb") as f:
with Image.open(f) as im:
# Valgrind should not complain here
im.load()
try:
im.load()
except OSError:
pass