mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-02 04:03:33 +03:00
Used isinstance instead of comparing types
This commit is contained in:
parent
63ae7fbfe9
commit
e51061dd59
|
@ -399,7 +399,7 @@ def _fixup_dict(src_dict):
|
||||||
# returns a dict with any single item tuples/lists as individual values
|
# returns a dict with any single item tuples/lists as individual values
|
||||||
def _fixup(value):
|
def _fixup(value):
|
||||||
try:
|
try:
|
||||||
if len(value) == 1 and type(value) != type({}):
|
if len(value) == 1 and not isinstance(value, dict):
|
||||||
return value[0]
|
return value[0]
|
||||||
except: pass
|
except: pass
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user