Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: HUG0-D <[email protected]>
  • Loading branch information
HUG0-D committed Nov 25, 2024
1 parent 339e5d7 commit dabbcf1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cimgen/languages/modernpython/utils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,14 @@ def _extract_attr_value_from_etree(self, class_attribute: dict, xml_attribute: e
attr_value = attr_value.rsplit("#")[-1]

elif class_attribute["is_list_attribute"]:
# other attributes types are defined in .text
attr_value = xml_attribute
attr_value = self.key.append(attr_value)
else:
# other attributes types are defined in .text
attr_value = xml_attribute.text
# primitive classes are described in "cim_data_type" allowing to retrieve the data type

if class_attribute["is_primitive_attribute"] or class_attribute["is_datatype_attribute"]:
# primitive classes are described in "attribute_class" allowing to retrieve the data type
if class_attribute["attribute_class"].type == bool:
attr_value = {"true": True, "false": False}.get(attr_value, None)
else:
Expand Down

0 comments on commit dabbcf1

Please sign in to comment.