Update src/PIL/Image.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Matthew Treinish 2023-07-06 09:00:00 -04:00 committed by GitHub
parent 6d440ac995
commit 9517feccd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -662,7 +662,7 @@ class Image:
:returns: JPEG version of the image as bytes
"""
try:
self._repr_image("JPEG")
return self._repr_image("JPEG")
except Exception:
return None