mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
xmlbuilder: Log broken XML if we can't parse it
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1066564
This commit is contained in:
parent
b5c3fe1da5
commit
87c2ff1a14
@ -686,7 +686,13 @@ class _XMLState(object):
|
|||||||
else:
|
else:
|
||||||
if not xml:
|
if not xml:
|
||||||
xml = self.make_xml_stub()
|
xml = self.make_xml_stub()
|
||||||
doc = libxml2.parseDoc(xml)
|
|
||||||
|
try:
|
||||||
|
doc = libxml2.parseDoc(xml)
|
||||||
|
except:
|
||||||
|
logging.debug("Error parsing xml=\n%s", xml)
|
||||||
|
raise
|
||||||
|
|
||||||
self.xml_root_doc = _DocCleanupWrapper(doc)
|
self.xml_root_doc = _DocCleanupWrapper(doc)
|
||||||
self.xml_node = doc.children
|
self.xml_node = doc.children
|
||||||
self.xml_node.virtinst_is_build = self.is_build
|
self.xml_node.virtinst_is_build = self.is_build
|
||||||
|
Loading…
Reference in New Issue
Block a user