Fixed unused variables

When possible removed, otherwise renamed to start with an underscore.
This commit is contained in:
Marta Marczykowska-Górecka 2017-11-09 16:26:05 +01:00
parent 3f7f5a9da3
commit 695303f16a
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B
4 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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:

View File

@ -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)

View File

@ -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]