A bunch of misc errors

Fixed a bunch of small errors: bad indents, superfluous parentheses,
missing whitespace, superfluous statement.
This commit is contained in:
Marta Marczykowska-Górecka 2017-11-09 17:30:22 +01:00
parent e543144aec
commit 95599dff9f
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B
2 changed files with 3 additions and 4 deletions

View File

@ -447,7 +447,7 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel):
if section < len(self.__column_names) \ if section < len(self.__column_names) \
and orientation == QtCore.Qt.Horizontal \ and orientation == QtCore.Qt.Horizontal \
and role == QtCore.Qt.DisplayRole: and role == QtCore.Qt.DisplayRole:
return self.__column_names[section] return self.__column_names[section]
@property @property
def children(self): def children(self):

View File

@ -67,7 +67,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.setWindowTitle(self.tr("Settings: {vm}").format(vm=self.vm.name)) self.setWindowTitle(self.tr("Settings: {vm}").format(vm=self.vm.name))
if init_page in self.tabs_indices: if init_page in self.tabs_indices:
idx = self.tabs_indices[init_page] idx = self.tabs_indices[init_page]
assert (idx in range(self.tabWidget.count())) assert idx in range(self.tabWidget.count())
self.tabWidget.setCurrentIndex(idx) self.tabWidget.setCurrentIndex(idx)
self.connect(self.buttonBox, self.connect(self.buttonBox,
@ -199,7 +199,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.temp_full_access.isChecked(), self.temp_full_access.isChecked(),
self.temp_full_access_time.value()) self.temp_full_access_time.value())
except qubesadmin.exc.QubesException as qex: except qubesadmin.exc.QubesException as qex:
ret+= [self.tr("Firewall tab:"), str(qex)] ret += [self.tr("Firewall tab:"), str(qex)]
except Exception as ex: # pylint: disable=broad-except except Exception as ex: # pylint: disable=broad-except
ret += [self.tr("Firewall tab:"), repr(ex)] ret += [self.tr("Firewall tab:"), repr(ex)]
@ -625,7 +625,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
def __init__(self, name, ident, parent=None): def __init__(self, name, ident, parent=None):
super(DevListWidgetItem, self).__init__(name, parent) super(DevListWidgetItem, self).__init__(name, parent)
self.ident = ident self.ident = ident
self.Type
persistent = [ass.ident.replace('_', ':') persistent = [ass.ident.replace('_', ':')
for ass in self.vm.devices['pci'].persistent()] for ass in self.vm.devices['pci'].persistent()]