tests: uitests: livetests: Fix LXC domain cleanup

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2022-08-01 10:38:01 -04:00
parent b8a77805b0
commit 58ffe7fa7a
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ def _vm_wrapper(vmname, uri="qemu:///system", opts=None):
except Exception:
pass
try:
dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM)
flags = 0
if "qemu" in uri:
flags = libvirt.VIR_DOMAIN_UNDEFINE_NVRAM
dom.undefineFlags(flags)
dom.destroy()
except Exception:
pass