Merge remote-tracking branch 'origin/pr/291'

* origin/pr/291:
  mock QubesVMNotFoundError
  manager: Handle removal of VM during on_shutdown.
This commit is contained in:
Marek Marczykowski-Górecki 2021-05-30 00:56:24 +02:00
commit 340a28f108
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 5 additions and 1 deletions

View File

@ -1059,7 +1059,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
update(event="outdated") update(event="outdated")
self.proxy.invalidate() self.proxy.invalidate()
self.table_selection_changed() self.table_selection_changed()
except exc.QubesDaemonAccessError: except (exc.QubesDaemonAccessError, exc.QubesVMNotFoundError):
return # the VM was deleted before its status could be updated return # the VM was deleted before its status could be updated
except KeyError: # adding the VM failed for some reason except KeyError: # adding the VM failed for some reason
self.on_domain_added(None, None, vm) self.on_domain_added(None, None, vm)

View File

@ -6,6 +6,10 @@ class QubesException(BaseException):
pass pass
class QubesVMNotFoundError(BaseException):
pass
class QubesVMNotStartedError(BaseException): class QubesVMNotStartedError(BaseException):
pass pass