Allow imperial units

This commit is contained in:
Lukas Klass 2020-10-03 17:52:43 +02:00
parent e20e602d94
commit d29ca5a774

View File

@ -37,6 +37,8 @@ class Entry(object):
attribs = list(xml.attrib.keys()) attribs = list(xml.attrib.keys())
units = list(filter(re.compile(".*_unit$").match, attribs)) units = list(filter(re.compile(".*_unit$").match, attribs))
for unit in units: for unit in units:
# enable imperial units
u.imperial.enable()
var = unit.replace("_unit", "") var = unit.replace("_unit", "")
if hasattr(self, var): if hasattr(self, var):
try: try: