Merge pull request #61917 from Calinou/makerst-fix-error-reporting

This commit is contained in:
Rémi Verschelde 2022-06-11 10:51:03 +02:00 committed by GitHub
commit d62cb0e571
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -464,17 +464,17 @@ def main(): # type: () -> None
try:
tree = ET.parse(cur_file)
except ET.ParseError as e:
print_error("{}.xml: Parse error while reading the file: {}".format(cur_file, e), state)
print_error("{}: Parse error while reading the file: {}".format(cur_file, e), state)
continue
doc = tree.getroot()
if "version" not in doc.attrib:
print_error('{}.xml: "version" attribute missing from "doc".'.format(cur_file), state)
print_error('{}: "version" attribute missing from "doc".'.format(cur_file), state)
continue
name = doc.attrib["name"]
if name in classes:
print_error('{}.xml: Duplicate class "{}".'.format(cur_file, name), state)
print_error('{}: Duplicate class "{}".'.format(cur_file, name), state)
continue
classes[name] = (doc, cur_file)