mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
init() if one of the formats is unrecognised
This commit is contained in:
parent
2d6e51e26c
commit
7e2015c75f
|
@ -2905,6 +2905,8 @@ def open(fp, mode="r", formats=None):
|
|||
|
||||
def _open_core(fp, filename, prefix, formats):
|
||||
for i in formats:
|
||||
if i not in OPEN:
|
||||
init()
|
||||
try:
|
||||
factory, accept = OPEN[i]
|
||||
result = not accept or accept(prefix)
|
||||
|
|
Loading…
Reference in New Issue
Block a user