fix: check if structural is loaded
This commit is contained in:
parent
5fd22e56d4
commit
daabd0d202
1 changed files with 3 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ class Annotator(Walk):
|
||||||
hasattr(child, "hcl_type") and child.hcl_type == "block"
|
hasattr(child, "hcl_type") and child.hcl_type == "block"
|
||||||
)
|
)
|
||||||
information_value = None
|
information_value = None
|
||||||
if child.hcl_type == "label":
|
if hasattr(child, "hcl_type") and child.hcl_type == "label":
|
||||||
if is_label == False:
|
if is_label == False:
|
||||||
raise Exception()
|
raise Exception()
|
||||||
information_value = "label"
|
information_value = "label"
|
||||||
|
|
@ -70,9 +70,8 @@ class Annotator(Walk):
|
||||||
self.objectspace.informations.add(
|
self.objectspace.informations.add(
|
||||||
child.path, "hcl_type", information_value
|
child.path, "hcl_type", information_value
|
||||||
)
|
)
|
||||||
hcl_name = getattr(child, "hcl_name")
|
if hasattr(child, "hcl_name") and child.hcl_name:
|
||||||
if hcl_name:
|
self.objectspace.informations.add(child.path, "hcl_name", child.hcl_name)
|
||||||
self.objectspace.informations.add(child.path, "hcl_name", hcl_name)
|
|
||||||
return is_label
|
return is_label
|
||||||
|
|
||||||
def parse_variable(self):
|
def parse_variable(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue