Bugfix: catch multiple errors
This commit is contained in:
parent
dac889a1fd
commit
59439964c6
@ -84,7 +84,7 @@ class Entry(object):
|
|||||||
mes = self.check_quantity(name, unit, use_default)
|
mes = self.check_quantity(name, unit, use_default)
|
||||||
if mes is not None:
|
if mes is not None:
|
||||||
return mes
|
return mes
|
||||||
except [ValueError, TypeError]:
|
except (ValueError, TypeError):
|
||||||
return "Expected parameter '" + name + "' with unit '" + unit.to_string() + \
|
return "Expected parameter '" + name + "' with unit '" + unit.to_string() + \
|
||||||
"' but got no unit and cannot convert '" + attr + "' to a numeric value."
|
"' but got no unit and cannot convert '" + attr + "' to a numeric value."
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user