mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Moved case transformation before initialization check
This commit is contained in:
parent
0c1675a143
commit
587e073dac
|
@ -2922,10 +2922,11 @@ def open(fp, mode="r", formats=None):
|
|||
|
||||
def _open_core(fp, filename, prefix, formats):
|
||||
for i in formats:
|
||||
i = i.upper()
|
||||
if i not in OPEN:
|
||||
init()
|
||||
try:
|
||||
factory, accept = OPEN[i.upper()]
|
||||
factory, accept = OPEN[i]
|
||||
result = not accept or accept(prefix)
|
||||
if type(result) in [str, bytes]:
|
||||
accept_warnings.append(result)
|
||||
|
|
Loading…
Reference in New Issue
Block a user