virt-xml: fix defined_xml_is_unchanged
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@redhat.com>
This commit is contained in:
parent
5f0155508d
commit
29f9f5f2d7
4
virt-xml
4
virt-xml
|
@ -105,8 +105,8 @@ def get_domain_and_guest(conn, domstr):
|
||||||
|
|
||||||
def defined_xml_is_unchanged(conn, domain, original_xml):
|
def defined_xml_is_unchanged(conn, domain, original_xml):
|
||||||
rawxml = get_xmldesc(domain, inactive=True)
|
rawxml = get_xmldesc(domain, inactive=True)
|
||||||
new_xml = virtinst.Guest(conn, parsexml=rawxml)
|
new_xml = virtinst.Guest(conn, parsexml=rawxml).get_xml()
|
||||||
return new_xml != original_xml
|
return new_xml == original_xml
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
|
|
Loading…
Reference in New Issue