mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-10 07:14:46 +03:00
include exception in warning message
This commit is contained in:
parent
05c3646058
commit
0568292553
|
@ -519,7 +519,7 @@ def _encode_ipython_image(image, image_format):
|
||||||
try:
|
try:
|
||||||
image.save(b, image_format)
|
image.save(b, image_format)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
warnings.warn(f"failed to encode image as {image_format}")
|
warnings.warn(f"failed to encode image as {image_format}: {e}")
|
||||||
return None
|
return None
|
||||||
return b.getvalue()
|
return b.getvalue()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user