From 72cbec76458f809976027395bc10f00c75a6baf5 Mon Sep 17 00:00:00 2001 From: 3hhh Date: Fri, 9 Apr 2021 17:55:57 +0200 Subject: [PATCH 1/2] manager: Handle removal of VM during on_shutdown. Fixes QubesOS/qubes-issues#5105 --- qubesmanager/qube_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index e9e61df..c87d76c 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -1061,7 +1061,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): update(event="outdated") self.proxy.invalidate() self.table_selection_changed() - except exc.QubesDaemonAccessError: + except (exc.QubesDaemonAccessError, exc.QubesVMNotFoundError): return # the VM was deleted before its status could be updated except KeyError: # adding the VM failed for some reason self.on_domain_added(None, None, vm) From 17e6bf00baabe47c0a8847ed28f488917d343727 Mon Sep 17 00:00:00 2001 From: 3hhh Date: Sun, 11 Apr 2021 09:02:40 +0200 Subject: [PATCH 2/2] mock QubesVMNotFoundError --- test-packages/qubesadmin/exc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test-packages/qubesadmin/exc.py b/test-packages/qubesadmin/exc.py index 023ba21..3454ed8 100644 --- a/test-packages/qubesadmin/exc.py +++ b/test-packages/qubesadmin/exc.py @@ -6,6 +6,10 @@ class QubesException(BaseException): pass +class QubesVMNotFoundError(BaseException): + pass + + class QubesVMNotStartedError(BaseException): pass