Skip to content

Commit

Permalink
Update ssg/build_derivatives to avoid duplication
Browse files Browse the repository at this point in the history
Signed-off-by: Armando Acosta <[email protected]>
  • Loading branch information
mrkanon committed Sep 3, 2024
1 parent 593fda8 commit 2c06075
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ssg/build_derivatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def add_element_to(oval_root, tag_name, component_element):
if xml_el is None:
xml_el = ElementTree.Element("{%s}%s" % (oval_namespace, tag_name))
oval_root.append(xml_el)
xml_el.append(component_element)
if xml_el.find("%s[@id='%s']" % (component_element.tag, component_element.get("id"))) is None:
xml_el.append(component_element)


def add_oval_components_to_oval_xml(oval_root, tag_name, component_dict):
Expand Down

0 comments on commit 2c06075

Please sign in to comment.