Caught KeyError and changed to log message. (#782)

Fixed missing key breaking report combining.
This commit is contained in:
SSpalding
2021-05-18 11:13:59 -07:00
committed by GitHub
parent 906780a01f
commit 39de8631f2
@@ -118,8 +118,10 @@ def _merge_xml_results(xml_results_path, prefix, merged_xml_name, parent_element
def _aggregate_attributes(nodes):
for node in nodes:
for attribute in attributes_to_aggregate:
value = node.attrib[attribute.name]
temp_dict[attribute.name] += attribute.func(value)
if attribute.name in node.attrib:
temp_dict[attribute.name] += attribute.func(node.attrib[attribute.name])
else:
print("Failed to find key {} in {}, continuing...".format(attribute.name, node.tag))
base_tree = xet.parse(xml_files[0])
base_tree_root = base_tree.getroot()