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:
Cole Robinson 2014-02-25 12:45:15 -05:00
parent b5c3fe1da5
commit 87c2ff1a14
1 changed files with 7 additions and 1 deletions

View File

@ -686,7 +686,13 @@ class _XMLState(object):
else:
if not xml:
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_node = doc.children
self.xml_node.virtinst_is_build = self.is_build