mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Use isinstance to detect Image instances
This commit is contained in:
parent
e0845f06d8
commit
adb6918214
|
@ -268,7 +268,7 @@ def lambda_eval(
|
|||
args.update(options)
|
||||
args.update(kw)
|
||||
for k, v in args.items():
|
||||
if hasattr(v, "im"):
|
||||
if isinstance(v, Image.Image):
|
||||
args[k] = _Operand(v)
|
||||
|
||||
out = expression(args)
|
||||
|
@ -319,7 +319,7 @@ def unsafe_eval(
|
|||
args.update(options)
|
||||
args.update(kw)
|
||||
for k, v in args.items():
|
||||
if hasattr(v, "im"):
|
||||
if isinstance(v, Image.Image):
|
||||
args[k] = _Operand(v)
|
||||
|
||||
compiled_code = compile(expression, "<string>", "eval")
|
||||
|
|
Loading…
Reference in New Issue
Block a user