This commit is contained in:
tooomm 2022-02-05 21:05:47 +01:00 committed by GitHub
parent c0d726a9e2
commit bb0e3b89ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,7 +258,7 @@ def close_xml_file(card_xml_file: IO[Any]) -> None:
parser = etree.XMLParser(remove_blank_text=True)
root = etree.parse(card_xml_file.name, parser).getroot()
with pathlib.Path(card_xml_file.name).open("wb") as f:
f.write(etree.tostring(root, encoding = "UTF-8", xml_declaration = True, pretty_print=True))
f.write(etree.tostring(root, encoding="UTF-8", xml_declaration=True, pretty_print=True))
def xml_escape(text):