Fixed unused variables
When possible removed, otherwise renamed to start with an underscore.
This commit is contained in:
parent
3f7f5a9da3
commit
695303f16a
@ -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)
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user