mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Do not catch a ValueError only to raise another
This commit is contained in:
parent
4ed79ea79c
commit
ff0ad9af34
|
@ -1626,7 +1626,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