From 695303f16ae9c3647734506cd6976d71a8889d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Thu, 9 Nov 2017 16:26:05 +0100 Subject: [PATCH] Fixed unused variables When possible removed, otherwise renamed to start with an underscore. --- qubesmanager/appmenu_select.py | 2 +- qubesmanager/firewall.py | 2 +- qubesmanager/settings.py | 2 +- qubesmanager/utils.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qubesmanager/appmenu_select.py b/qubesmanager/appmenu_select.py index f241fc6..3cf6c10 100755 --- a/qubesmanager/appmenu_select.py +++ b/qubesmanager/appmenu_select.py @@ -33,7 +33,7 @@ class AppListWidgetItem(PyQt4.QtGui.QListWidgetItem): @classmethod def from_line(cls, line): - ident, icon_name, name = line.strip().split(maxsplit=2) + ident, _icon_name, name = line.strip().split(maxsplit=2) return cls(name=name, ident=ident) diff --git a/qubesmanager/firewall.py b/qubesmanager/firewall.py index d7b411a..9a8427f 100644 --- a/qubesmanager/firewall.py +++ b/qubesmanager/firewall.py @@ -389,7 +389,7 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel): elif service is not None and service != "": try: rule.dstports = service - except (TypeError, ValueError) as ex: + except (TypeError, ValueError): if self.get_service_port(service) is not None: rule.dstports = self.get_service_port(service) else: diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index b5faa3d..cc53ebe 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -106,7 +106,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog): model.set_vm(vm) self.set_fw_model(model) self.firewall_modified_outside_label.setVisible(False) - except firewall.FirewallModifiedOutsideError as ex: + except firewall.FirewallModifiedOutsideError: self.disable_all_fw_conf() self.new_rule_button.clicked.connect(self.new_rule_button_pressed) diff --git a/qubesmanager/utils.py b/qubesmanager/utils.py index b67ddf7..115ab8f 100644 --- a/qubesmanager/utils.py +++ b/qubesmanager/utils.py @@ -150,7 +150,7 @@ def get_path_from_vm(vm, service_name): if not vm: return None - stdout, stderr = vm.run_service_for_stdio(service_name) + stdout, _stderr = vm.run_service_for_stdio(service_name) untrusted_path = stdout.decode(encoding='ascii')[:path_max_len]