Fixed some indents and whitespaces

Fixed indents and whitespace that pylint was complaining about.
This commit is contained in:
Marta Marczykowska-Górecka 2018-01-08 20:56:22 +01:00
parent ec3d6eb84a
commit 60143e6a91
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

@ -278,8 +278,8 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.delete_vm_button.setEnabled(not self.vm.is_running()) self.delete_vm_button.setEnabled(not self.vm.is_running())
if self.vm.is_running(): if self.vm.is_running():
self.delete_vm_button.setText(self.tr('Delete VM ' self.delete_vm_button.setText(
'(cannot delete a running VM)')) self.tr('Delete VM (cannot delete a running VM)'))
if self.vm.qid == 0: if self.vm.qid == 0:
self.vmlabel.setVisible(False) self.vmlabel.setVisible(False)
@ -420,7 +420,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
return msg return msg
def check_mem_changes(self): def check_mem_changes(self):
if self.max_mem_size.value() < self.init_mem.value(): if self.max_mem_size.value() < self.init_mem.value():
QtGui.QMessageBox.warning( QtGui.QMessageBox.warning(
@ -457,7 +456,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.tr("ERROR: {}").format( self.tr("ERROR: {}").format(
t_monitor.error_msg)) t_monitor.error_msg))
def _rename_vm(self, t_monitor, name): def _rename_vm(self, t_monitor, name):
try: try:
self.vm.app.clone_vm(self.vm, name) self.vm.app.clone_vm(self.vm, name)
@ -470,7 +468,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
t_monitor.set_finished() t_monitor.set_finished()
def rename_vm(self): def rename_vm(self):
new_vm_name, ok = QtGui.QInputDialog.getText( new_vm_name, ok = QtGui.QInputDialog.getText(
@ -503,7 +500,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
' deleted. <br/> If you are sure, please enter this ' ' deleted. <br/> If you are sure, please enter this '
'VM\'s name below.')) 'VM\'s name below.'))
if ok and answer == self.vm.name: if ok and answer == self.vm.name:
self._run_in_thread(self._remove_vm) self._run_in_thread(self._remove_vm)
self.done(0) self.done(0)
@ -669,7 +665,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.dev_list.setEnabled(True) self.dev_list.setEnabled(True)
self.turn_off_vm_to_modify_devs.setVisible(False) self.turn_off_vm_to_modify_devs.setVisible(False)
def __apply_devices_tab__(self): def __apply_devices_tab__(self):
msg = [] msg = []
@ -815,7 +810,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
item = self.services_list.takeItem(row) item = self.services_list.takeItem(row)
del self.new_srv_dict[str(item.text())] del self.new_srv_dict[str(item.text())]
def services_item_clicked(self, item): def services_item_clicked(self, item):
if str(item.text()) == 'meminfo-writer': if str(item.text()) == 'meminfo-writer':
if item.checkState() == ui_settingsdlg.QtCore.Qt.Checked: if item.checkState() == ui_settingsdlg.QtCore.Qt.Checked:
@ -825,7 +819,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
if self.include_in_balancing.isChecked(): if self.include_in_balancing.isChecked():
self.include_in_balancing.setChecked(False) self.include_in_balancing.setChecked(False)
def __apply_services_tab__(self): def __apply_services_tab__(self):
msg = [] msg = []
@ -861,9 +854,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
return msg return msg
######### firewall tab related ######### firewall tab related
def set_fw_model(self, model): def set_fw_model(self, model):
self.fw_model = model self.fw_model = model
self.rulesTreeView.setModel(model) self.rulesTreeView.setModel(model)
@ -970,6 +961,7 @@ parser.set_defaults(
tab='basic', tab='basic',
) )
def main(args=None): def main(args=None):
args = parser.parse_args(args) args = parser.parse_args(args)
vm = args.domains.pop() vm = args.domains.pop()