From cbf2e2154ddb433ae5fedd5b115cc810c759144d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Fri, 14 Sep 2018 18:01:20 +0200 Subject: [PATCH] Fixed a small bug with Qube Manager status refresh On change of template Vm status, qube Manager errored out. It no logner does that. --- qubesmanager/qube_manager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 70f07f6..5e08875 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -468,8 +468,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.table_selection_changed() if vm.klass == 'TemplateVM': - for row in self.vms_in_table: - if row.vm.template == vm: + for row in self.vms_in_table.values(): + if getattr(row.vm, 'template', None) == vm: row.info_widget.update_vm_state() def on_domain_changed(self, vm, _event, **_kwargs): @@ -883,7 +883,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): if reply == QtGui.QMessageBox.Yes: self.shutdown_vm(vm) - def shutdown_vm(self, vm, shutdown_time=vm_shutdown_timeout, check_time=vm_restart_check_timeout, and_restart=False): try: