diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 3e5b4c2..12ffb99 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -492,6 +492,11 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): timer.start(1000 * 30) # 30s self.check_updates() + def clear_threads(self): + for thread in self.threads_list: + if thread.isFinished(): + self.threads_list.remove(thread) + def closeEvent(self, event): # pylint: disable=invalid-name # save window size at close @@ -786,11 +791,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): thread.finished.connect(self.clear_threads) thread.start() - def clear_threads(self): - for thread in self.threads_list: - if thread.isFinished(): - self.threads_list.remove(thread) - # noinspection PyArgumentList @QtCore.pyqtSlot(name='on_action_clonevm_triggered') def action_clonevm_triggered(self):