mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
sync_qemu_models_i386: Switch to lxml
XMLs parse/format round trip using lxml results in an XML document that almost exactly matches the original (including comments). Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
19cfe21d4e
commit
3bb2c2b641
@ -4,7 +4,7 @@ import argparse
|
||||
import copy
|
||||
import os
|
||||
import re
|
||||
import xml.etree.ElementTree
|
||||
import lxml.etree
|
||||
|
||||
import lark
|
||||
|
||||
@ -592,7 +592,7 @@ def main():
|
||||
|
||||
try:
|
||||
filename = os.path.join(args.outdir, "x86_features.xml")
|
||||
dom = xml.etree.ElementTree.parse(filename)
|
||||
dom = lxml.etree.parse(filename)
|
||||
known = [x.attrib["name"] for x in dom.getroot().iter("feature")]
|
||||
unknown = [x for x in features if x not in known and x is not None]
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user