From 877eeaac2a6ec906bf99997687934d99acc4c33b Mon Sep 17 00:00:00 2001 From: donoban Date: Wed, 13 Jun 2018 21:38:39 +0200 Subject: [PATCH] Added BaseException --- qubesmanager/qube_manager.py | 4 ++-- qubesmanager/table_widgets.py | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 8d4fa9c..4bcd672 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -967,7 +967,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): # vm could be deleted on renaming try: self.vms_in_table[vm.qid].update() - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseExeption): pass @@ -1246,7 +1246,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.logs_menu.setEnabled(not menu_empty) self.context_menu.exec_(self.table.mapToGlobal(point)) - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseExeption): pass @QtCore.pyqtSlot('QAction *') diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py index bdacd7e..9ac9f0b 100644 --- a/qubesmanager/table_widgets.py +++ b/qubesmanager/table_widgets.py @@ -85,7 +85,7 @@ class VmTypeWidget(VmIconWidget): elif self.value == other.value: return self.vm.name < other.vm.name return self.value < other.value - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False def __init__(self, vm, parent=None): @@ -135,7 +135,7 @@ class VmLabelWidget(VmIconWidget): elif self.value == other.value: return self.vm.name < other.vm.name return self.value < other.value - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False def __init__(self, vm, parent=None): @@ -166,7 +166,7 @@ class VmNameItem(QtGui.QTableWidgetItem): elif other.qid == 0: return False return super(VmNameItem, self).__lt__(other) - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -212,7 +212,7 @@ class VmInfoWidget(QtGui.QWidget): return True elif other.vm.qid == 0: return False - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False self_val = self.upd_info_item.value @@ -303,7 +303,7 @@ class VmTemplateItem(QtGui.QTableWidgetItem): elif self.text() == other.text(): return self.vm.name < other.vm.name return super(VmTemplateItem, self).__lt__(other) - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -330,7 +330,7 @@ class VmNetvmItem(QtGui.QTableWidgetItem): elif self.text() == other.text(): return self.vm.name < other.vm.name return super(VmNetvmItem, self).__lt__(other) - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -354,7 +354,7 @@ class VmInternalItem(QtGui.QTableWidgetItem): elif other.vm.qid == 0: return False return super(VmInternalItem, self).__lt__(other) - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -384,7 +384,7 @@ class VmUpdateInfoWidget(QtGui.QWidget): elif self.value == other.value: return self.vm.name < other.vm.name return self.value < other.value - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False def __init__(self, vm, show_text=True, parent=None): @@ -494,7 +494,7 @@ class VmSizeOnDiskItem(QtGui.QTableWidgetItem): elif self.value == other.value: return self.vm.name < other.vm.name return self.value < other.value - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -517,7 +517,7 @@ class VmIPItem(QtGui.QTableWidgetItem): elif other.vm.qid == 0: return False return super(VmIPItem, self).__lt__(other) - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -544,7 +544,7 @@ class VmIncludeInBackupsItem(QtGui.QTableWidgetItem): elif self.vm.include_in_backups == other.vm.include_in_backups: return self.vm.name < other.vm.name return self.vm.include_in_backups < other.vm.include_in_backups - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False @@ -579,5 +579,5 @@ class VmLastBackupItem(QtGui.QTableWidgetItem): elif not other.backup_timestamp: return True return self.backup_timestamp < other.backup_timestamp - except exc.QubesPropertyAccessError: # pylint: disable=no-member + except exc.QubesPropertyAccessError(BaseException): return False