Skip to content

Commit c837078

Browse files
radarherehugovk
andauthored
Correct logic
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 293eb45 commit c837078

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PIL/Image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3690,7 +3690,7 @@ def _open_core(
36903690
raise
36913691
return None
36923692

3693-
if im := _open_core(fp, filename, prefix, ID):
3693+
if not (im := _open_core(fp, filename, prefix, ID)):
36943694
# Try preinit (few common plugins) then init (all plugins)
36953695
for loader in (preinit, init):
36963696
checked_formats = ID.copy()

0 commit comments

Comments
 (0)