Przeglądaj źródła

app: allow removing VM referencing only itself

Fixes QubesOS/qubes-issues#4224
Marek Marczykowski-Górecki 5 lat temu
rodzic
commit
27a0fe25ab
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      qubes/app.py

+ 3 - 0
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 \