Fixed error with VM being incorrectly listed as its own dependency
fixes QubesOS/qubes-issues#4224
This commit is contained in:
parent
769f8a5ee8
commit
3e2b432644
@ -76,7 +76,7 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
|
||||
set(result),
|
||||
set([(vm, prop) for vm in self.vms for prop in self.vm_properties
|
||||
if (not vm.startswith('template')
|
||||
or not prop.startswith('template'))]),
|
||||
or not prop.startswith('template')) and vm != 'template1']),
|
||||
"Incorrect VM properties listed.")
|
||||
|
||||
def test_02_empty(self):
|
||||
|
@ -136,6 +136,8 @@ def vm_dependencies(app, reference_vm):
|
||||
vm_properties = ['template', 'netvm', 'default_dispvm', 'management_dispvm']
|
||||
|
||||
for vm in app.domains:
|
||||
if vm == reference_vm:
|
||||
continue
|
||||
for prop in vm_properties:
|
||||
if reference_vm == getattr(vm, prop, None) and \
|
||||
not vm.property_is_default(prop):
|
||||
|
Loading…
Reference in New Issue
Block a user