mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Fix #1954. Fix bug where importing MSProject XMLs with no project names failed.
This commit is contained in:
@@ -67,7 +67,7 @@ class MSP2Ifc:
|
|||||||
tree = ET.parse(self.xml)
|
tree = ET.parse(self.xml)
|
||||||
project = tree.getroot()
|
project = tree.getroot()
|
||||||
self.ns = {"pr": project.tag[1:].partition("}")[0]}
|
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_level = 0
|
||||||
self.outline_parents = {}
|
self.outline_parents = {}
|
||||||
self.parse_task_xml(project)
|
self.parse_task_xml(project)
|
||||||
|
|||||||
Reference in New Issue
Block a user