mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-25 08:10:33 +03:00
Do not use bare 'except'
This commit is contained in:
parent
f2d4d19cc4
commit
ac20a02b7a
|
@ -647,7 +647,7 @@ def createProfile(colorSpace, colorTemp=-1):
|
|||
if colorSpace == "LAB":
|
||||
try:
|
||||
colorTemp = float(colorTemp)
|
||||
except:
|
||||
except (TypeError, ValueError):
|
||||
raise PyCMSError(
|
||||
"Color temperature must be numeric, \"%s\" not valid"
|
||||
% colorTemp)
|
||||
|
|
Loading…
Reference in New Issue
Block a user