tests: be even more defensive on cleaning up VMs
Don't fail even if qubes-test.xml do not load at all because of syntax error - for example empty file.
This commit is contained in:
parent
c5a8135fdb
commit
a6c7da6061
@ -700,7 +700,7 @@ class SystemTestsMixin(object):
|
|||||||
try:
|
try:
|
||||||
cls.remove_vms(vm for vm in qubes.Qubes(xmlpath).domains
|
cls.remove_vms(vm for vm in qubes.Qubes(xmlpath).domains
|
||||||
if vm.name.startswith(prefix))
|
if vm.name.startswith(prefix))
|
||||||
except qubes.exc.QubesException:
|
except (qubes.exc.QubesException, lxml.etree.XMLSyntaxError):
|
||||||
# If qubes-test.xml is broken that much it doesn't even load,
|
# If qubes-test.xml is broken that much it doesn't even load,
|
||||||
# simply remove it. VMs will be cleaned up the hard way.
|
# simply remove it. VMs will be cleaned up the hard way.
|
||||||
# TODO logging?
|
# TODO logging?
|
||||||
|
Loading…
Reference in New Issue
Block a user