Fix KeyError: 'value' when parse TMX

This commit is contained in:
laqieer
2022-08-10 00:59:20 +08:00
committed by GitHub
parent 17700e8146
commit a0f9cf226a

View File

@@ -14,7 +14,7 @@ def parse(raw_properties: etree.Element) -> Properties:
for raw_property in raw_properties.findall("property"):
type_ = raw_property.attrib.get("type")
value_ = raw_property.attrib["value"]
value_ = raw_property.attrib.get("value")
if type_ == "file":
value = Path(value_)
elif type_ == "color":