mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix initialization of local variable "data" (#1813)
Co-authored-by: Nitsch Alexander <alexander.nitsch@scs.ch>
This commit is contained in:
@@ -645,9 +645,10 @@ class BcfXml:
|
|||||||
|
|
||||||
def get_comments(self, guid):
|
def get_comments(self, guid):
|
||||||
comments = {}
|
comments = {}
|
||||||
|
data = self._read_xml(os.path.join(guid, "markup.bcf"), "markup.xsd")
|
||||||
if "Comments" not in data["Topics"]:
|
if "Comments" not in data["Topics"]:
|
||||||
return comments
|
return comments
|
||||||
data = self._read_xml(os.path.join(guid, "markup.bcf"), "markup.xsd")
|
|
||||||
for item in data["Topic"]["Comments"].get("Comment", []):
|
for item in data["Topic"]["Comments"].get("Comment", []):
|
||||||
comment = bcf.v3.data.Comment()
|
comment = bcf.v3.data.Comment()
|
||||||
mandatory_keys = {
|
mandatory_keys = {
|
||||||
@@ -675,9 +676,9 @@ class BcfXml:
|
|||||||
|
|
||||||
def get_viewpoints(self, guid):
|
def get_viewpoints(self, guid):
|
||||||
viewpoints = {}
|
viewpoints = {}
|
||||||
|
data = self._read_xml(os.path.join(guid, "markup.bcf"), "markup.xsd")
|
||||||
if "Viewpoints" not in data["Topic"]:
|
if "Viewpoints" not in data["Topic"]:
|
||||||
return viewpoints
|
return viewpoints
|
||||||
data = self._read_xml(os.path.join(guid, "markup.bcf"), "markup.xsd")
|
|
||||||
for item in data["Topic"]["Viewpoints"]:
|
for item in data["Topic"]["Viewpoints"]:
|
||||||
viewpoint = self.get_viewpoint(item, guid)
|
viewpoint = self.get_viewpoint(item, guid)
|
||||||
viewpoints[viewpoint.guid] = viewpoint
|
viewpoints[viewpoint.guid] = viewpoint
|
||||||
|
|||||||
Reference in New Issue
Block a user