app: allow removing VM referencing only itself
Fixes QubesOS/qubes-issues#4224
This commit is contained in:
parent
7433f83581
commit
27a0fe25ab
@ -1366,6 +1366,9 @@ class Qubes(qubes.PropertyHolder):
|
|||||||
def on_domain_pre_deleted(self, event, vm):
|
def on_domain_pre_deleted(self, event, vm):
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
for obj in itertools.chain(self.domains, (self,)):
|
for obj in itertools.chain(self.domains, (self,)):
|
||||||
|
if obj is vm:
|
||||||
|
# allow removed VM to reference itself
|
||||||
|
continue
|
||||||
for prop in obj.property_list():
|
for prop in obj.property_list():
|
||||||
try:
|
try:
|
||||||
if isinstance(prop, qubes.vm.VMProperty) and \
|
if isinstance(prop, qubes.vm.VMProperty) and \
|
||||||
|
Loading…
Reference in New Issue
Block a user