mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-25 06:35:47 +00:00
trivial: Fix compile when using python 3.7 or older
Signed-off-by: Richard Hughes <richard@hughsie.com>
This commit is contained in:
parent
9df226ca08
commit
e9964a0f96
@ -23,6 +23,9 @@ for fn in sorted(sys.argv[2:]):
|
||||
n_file.set("preprocess", "xml-stripblanks")
|
||||
n_file.set("alias", os.path.basename(fn))
|
||||
with open(sys.argv[1], "wb") as f:
|
||||
f.write(ET.tostring(root, "utf-8", xml_declaration=True))
|
||||
try:
|
||||
f.write(ET.tostring(root, "utf-8", xml_declaration=True))
|
||||
except TypeError:
|
||||
f.write(ET.tostring(root, "utf-8"))
|
||||
|
||||
sys.exit(0)
|
||||
|
Loading…
Reference in New Issue
Block a user