Do not retry specified formats if they failed

This commit is contained in:
Andrew Murray 2023-01-14 23:22:35 +11:00
parent 43bb03539e
commit 5f9285eea6

View File

@ -3267,7 +3267,7 @@ def open(fp, mode="r", formats=None):
im = _open_core(fp, filename, prefix, formats)
if im is None:
if im is None and formats is ID:
if init():
im = _open_core(fp, filename, prefix, formats)