From 8c1a9e5120aac8a276e0567e1231c2eea9b53534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Mon, 3 Jun 2019 21:21:48 +0200 Subject: [PATCH] More safeguards for a VM that started in a weird way If for any reason adding a VM failed, Qube Manager will attempt to add it on the next state event it receives. references QubesOS/qubes-issues#5066 --- qubesmanager/qube_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 015bac8..3f15733 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -586,7 +586,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): row_to_delete = row qid_to_delete = qid if not row_to_delete: - return # for some reason, the VM was removed in some other way + return # for some reason, the VM was removed in some other way del self.vms_in_table[qid_to_delete] self.table.removeRow(row_to_delete.name_widget.row()) @@ -596,6 +596,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.vms_in_table[vm.qid].info_widget.update_vm_state() except exc.QubesPropertyAccessError: 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) if vm == self.get_selected_vm(): self.table_selection_changed()