mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
Merge pull request #5090 from radarhere/valueerror
Do not catch a ValueError only to raise another
This commit is contained in:
commit
5c64438792
|
@ -1634,7 +1634,7 @@ class Image:
|
|||
self.im = im
|
||||
self.pyaccess = None
|
||||
self.mode = self.im.mode
|
||||
except (KeyError, ValueError) as e:
|
||||
except KeyError as e:
|
||||
raise ValueError("illegal image mode") from e
|
||||
|
||||
if self.mode in ("LA", "PA"):
|
||||
|
|
Loading…
Reference in New Issue
Block a user