Fix #1954. Fix bug where importing MSProject XMLs with no project names failed.

This commit is contained in:
Dion Moult
2022-01-17 17:37:09 +11:00
parent 9ebe0aaa95
commit 52ea69bcec
+1 -1
View File
@@ -67,7 +67,7 @@ class MSP2Ifc:
tree = ET.parse(self.xml)
project = tree.getroot()
self.ns = {"pr": project.tag[1:].partition("}")[0]}
self.project["Name"] = project.find("pr:Name", self.ns).text
self.project["Name"] = project.findtext("pr:Name", namespaces=self.ns) or "Unnamed"
self.outline_level = 0
self.outline_parents = {}
self.parse_task_xml(project)