[virt-tools-list] [virt-manager PATCH] virt-xml: fix defined_xml_is_unchanged
Pavel Hrdina
phrdina at redhat.com
Tue Dec 3 12:06:46 UTC 2019
Commit <53f075ab76e1c372474ae0d88f202e487d9f213f> added a warning if the
VM XML is not changed after removing default devices but the code was
incorrect. We have to compare strings instead of string vs Guest object
and also the condition was inverted.
Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
Pushed.
virt-xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/virt-xml b/virt-xml
index 71445c9f..7b0174c9 100755
--- a/virt-xml
+++ b/virt-xml
@@ -105,8 +105,8 @@ def get_domain_and_guest(conn, domstr):
def defined_xml_is_unchanged(conn, domain, original_xml):
rawxml = get_xmldesc(domain, inactive=True)
- new_xml = virtinst.Guest(conn, parsexml=rawxml)
- return new_xml != original_xml
+ new_xml = virtinst.Guest(conn, parsexml=rawxml).get_xml()
+ return new_xml == original_xml
################
--
2.23.0
More information about the virt-tools-list
mailing list