Add try-except (#4357)

This commit is contained in:
Polina Mishanina 2021-02-16 19:47:38 +03:00 committed by GitHub
parent d9140a0f83
commit d383bc0d83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,10 @@ def merge_xmls(xmls):
xmls = []
for xml in args.xml:
xmls.append(ET.parse(xml).getroot())
try:
xmls.append(ET.parse(xml).getroot())
except ET.ParseError:
print("Error parsing", xml)
root = merge_xmls(xmls)
timestamp = root.attrib["timestamp"]