Caught KeyError and changed to log message. (#782)
Fixed missing key breaking report combining.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user