Bugfix: catch multiple errors

This commit is contained in:
Lukas Klass 2020-10-23 13:46:58 +02:00
parent dac889a1fd
commit 59439964c6

View File

@ -84,7 +84,7 @@ class Entry(object):
mes = self.check_quantity(name, unit, use_default)
if mes is not None:
return mes
except [ValueError, TypeError]:
except (ValueError, TypeError):
return "Expected parameter '" + name + "' with unit '" + unit.to_string() + \
"' but got no unit and cannot convert '" + attr + "' to a numeric value."
else: