From 27a0fe25ab250f65a84c13abbb0289547c858c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 19 Feb 2019 00:55:13 +0100 Subject: [PATCH] app: allow removing VM referencing only itself Fixes QubesOS/qubes-issues#4224 --- qubes/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qubes/app.py b/qubes/app.py index 51432b1c..e51ef133 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -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 \