Commit 372f26f4 authored by Matthias Markl's avatar Matthias Markl
Browse files

bug fix in pint_unit_converter.py

parent 1969d023
......@@ -113,12 +113,12 @@ class PintUnitConverter:
elif type(value) is tuple:
try:
result[key] = tuple( [ self.ureg.Quantity(e) for e in value ] )
except (pint.unit.UndefinedUnitError, ValueError, TypeError):
except (pint.UndefinedUnitError, ValueError, TypeError):
result[key] = value
else:
try:
result[key] = self.ureg.Quantity( value )
except (pint.unit.UndefinedUnitError, ValueError, TypeError):
except (pint.UndefinedUnitError, ValueError, TypeError):
result[key] = value
return result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment