app: allow removing VM referencing only itself

Fixes QubesOS/qubes-issues#4224
This commit is contained in:
Marek Marczykowski-Górecki 2019-02-19 00:55:13 +01:00
parent 7433f83581
commit 27a0fe25ab
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1366,6 +1366,9 @@ class Qubes(qubes.PropertyHolder):
def on_domain_pre_deleted(self, event, vm):
# pylint: disable=unused-argument
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():
try:
if isinstance(prop, qubes.vm.VMProperty) and \