rf: assume that there will always be a layer name

This commit is contained in:
Benjamin Kirkbride
2020-04-19 19:29:34 -04:00
parent b2dd3ac78a
commit 00ff8cb9ac

View File

@@ -184,11 +184,7 @@ def _parse_layer(
"""
id_ = int(layer_element.attrib["id"])
# FIXME: create example layer with no name (if possible)
if "name" in layer_element.attrib:
name = layer_element.attrib["name"]
else:
name = None
name = layer_element.attrib["name"]
offset: Optional[objects.OrderedPair]
offset_x_attrib = layer_element.attrib.get("offsetx")