Do not use bare 'except'

This commit is contained in:
Andrew Murray 2018-10-21 18:11:39 +11:00
parent f2d4d19cc4
commit ac20a02b7a

View File

@ -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)