virt-manager/0015-xmlbuilder-Log-broken-XML-if-we-can-t-parse-it.patch
Cole Robinson 8fe6a061b0 virt-convert: better error if unar is not installed
details: Fix fallback if fetching CPU models fails (bz #1072704)
fsdetails: Fix adding a filesystem device (bz #1073067)
virt-install: Fix --location iso again, and test it (bz #1071513)
Handle libvirt generating invalid volume XML (bz #1072770)
2014-03-06 12:58:21 -05:00

32 lines
1.1 KiB
Diff

From f65c9dd2d1baccb66e1ac985e50d8cd021e59509 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 25 Feb 2014 12:45:15 -0500
Subject: [PATCH] xmlbuilder: Log broken XML if we can't parse it
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1066564
(cherry picked from commit 87c2ff1a14f3a78648c8a17cfa72e83098763ec8)
---
virtinst/xmlbuilder.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py
index d46738c..328f6f2 100644
--- a/virtinst/xmlbuilder.py
+++ b/virtinst/xmlbuilder.py
@@ -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