Remove trailing semicolons

This commit is contained in:
Marek Marczykowski-Górecki 2014-02-23 00:44:08 +01:00
parent 17107a7012
commit 3ea49b5192
7 changed files with 19 additions and 19 deletions

View File

@ -120,9 +120,9 @@ class AppmenuSelectManager:
added.append(item) added.append(item)
if self.app_list.selected_list.count() - len(added) < len(self.whitelisted_appmenus): #sth removed if self.app_list.selected_list.count() - len(added) < len(self.whitelisted_appmenus): #sth removed
sth_changed = True; sth_changed = True
elif len(added) > 0: elif len(added) > 0:
sth_changed = True; sth_changed = True
if sth_changed == True: if sth_changed == True:
whitelisted = open(self.vm.dir_path + '/' + whitelisted_filename, 'w') whitelisted = open(self.vm.dir_path + '/' + whitelisted_filename, 'w')

View File

@ -197,7 +197,7 @@ class BackupVMsWindow(Ui_Backup, QWizard):
def shutdown_all_running_selected(self): def shutdown_all_running_selected(self):
(names, vms) = self.get_running_vms() (names, vms) = self.get_running_vms()
if len(vms) == 0: if len(vms) == 0:
return; return
for vm in vms: for vm in vms:
self.blk_manager.check_if_serves_as_backend(vm) self.blk_manager.check_if_serves_as_backend(vm)

View File

@ -65,8 +65,8 @@ def copy_text_to_qubes_clipboard(text):
#inter-appviewer lock #inter-appviewer lock
try: try:
fd = os.open("/var/run/qubes/appviewer.lock", os.O_RDWR|os.O_CREAT, 0600); fd = os.open("/var/run/qubes/appviewer.lock", os.O_RDWR|os.O_CREAT, 0600)
fcntl.flock(fd, fcntl.LOCK_EX); fcntl.flock(fd, fcntl.LOCK_EX)
except IOError: except IOError:
QMessageBox.warning (None, "Warning!", "Error while accessing Qubes clipboard!") QMessageBox.warning (None, "Warning!", "Error while accessing Qubes clipboard!")
return return

View File

@ -415,7 +415,7 @@ class VmUsageBarWidget (QWidget):
self.widget = QProgressBar() self.widget = QProgressBar()
self.widget.setMinimum(min) self.widget.setMinimum(min)
self.widget.setMaximum(max) self.widget.setMaximum(max)
self.widget.setFormat(format); self.widget.setFormat(format)
self.widget.setStyleSheet( self.widget.setStyleSheet(
"QProgressBar:horizontal{" +\ "QProgressBar:horizontal{" +\
@ -825,7 +825,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
self.columns_actions[ self.columns_indices["Size"] ] = self.action_size_on_disk self.columns_actions[ self.columns_indices["Size"] ] = self.action_size_on_disk
self.columns_actions[ self.columns_indices["Internal"] ] = self.action_internal self.columns_actions[ self.columns_indices["Internal"] ] = self.action_internal
self.visible_columns_count = len(self.columns_indices); self.visible_columns_count = len(self.columns_indices)
self.table.setColumnHidden( self.columns_indices["NetVM"], True) self.table.setColumnHidden( self.columns_indices["NetVM"], True)
self.action_netvm.setChecked(False) self.action_netvm.setChecked(False)
self.table.setColumnHidden( self.columns_indices["CPU Graph"], True) self.table.setColumnHidden( self.columns_indices["CPU Graph"], True)
@ -1756,7 +1756,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
for c in self.columns_actions: for c in self.columns_actions:
if not self.columns_actions[c].isEnabled(): if not self.columns_actions[c].isEnabled():
self.columns_actions[c].setEnabled(True) self.columns_actions[c].setEnabled(True)
break; break
if self.settings_loaded: if self.settings_loaded:
col_name = [name for name in self.columns_indices.keys() if self.columns_indices[name] == col_num][0] col_name = [name for name in self.columns_indices.keys() if self.columns_indices[name] == col_num][0]
@ -2158,7 +2158,7 @@ def get_frame_size():
if len(line) == 4: if len(line) == 4:
w = int(line[0].strip())+ int(line[1].strip()) w = int(line[0].strip())+ int(line[1].strip())
h = int(line[2].strip())+ int(line[3].strip()) h = int(line[2].strip())+ int(line[3].strip())
break; break
#in case of some weird window managers we have to assume sth... #in case of some weird window managers we have to assume sth...
if w<= 0: if w<= 0:
w = 10 w = 10

View File

@ -20,15 +20,15 @@ fi
if sudo cryptsetup isLuks $1 ; then if sudo cryptsetup isLuks $1 ; then
# Is a luks device # Is a luks device
if ! $PROMPT "Please unlock the LUKS-encrypted $1 device:" | sudo pmount $1 $2 ; then if ! $PROMPT "Please unlock the LUKS-encrypted $1 device:" | sudo pmount $1 $2 ; then
exit 1; exit 1
fi fi
else else
#not luks! #not luks!
if ! sudo pmount $1 $2 ; then if ! sudo pmount $1 $2 ; then
exit 1; exit 1
fi fi
fi fi
#all ok :) #all ok :)
exit 0; exit 0

View File

@ -11,7 +11,7 @@ class MultiSelectWidget(Ui_MultiSelectWidget, QWidget):
def __init__(self, parent=None): def __init__(self, parent=None):
super(MultiSelectWidget, self).__init__() super(MultiSelectWidget, self).__init__()
self.setupUi(self); self.setupUi(self)
self.add_selected_button.clicked.connect(self.add_selected) self.add_selected_button.clicked.connect(self.add_selected)
self.add_all_button.clicked.connect(self.add_all) self.add_all_button.clicked.connect(self.add_all)
self.remove_selected_button.clicked.connect(self.remove_selected) self.remove_selected_button.clicked.connect(self.remove_selected)

View File

@ -294,12 +294,12 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
#networking info #networking info
if self.vm.is_networked(): if self.vm.is_networked():
self.networking_groupbox.setEnabled(True); self.networking_groupbox.setEnabled(True)
self.ip_label.setText(self.vm.ip if self.vm.ip is not None else "none") self.ip_label.setText(self.vm.ip if self.vm.ip is not None else "none")
self.netmask_label.setText(self.vm.netmask if self.vm.netmask is not None else "none") self.netmask_label.setText(self.vm.netmask if self.vm.netmask is not None else "none")
self.gateway_label.setText(self.vm.netvm.gateway if self.vm.netvm is not None else "none") self.gateway_label.setText(self.vm.netvm.gateway if self.vm.netvm is not None else "none")
else: else:
self.networking_groupbox.setEnabled(False); self.networking_groupbox.setEnabled(False)
#max priv storage #max priv storage
self.priv_img_size = self.vm.get_private_img_sz()/1024/1024 self.priv_img_size = self.vm.get_private_img_sz()/1024/1024
@ -426,7 +426,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
self.max_mem_size.setValue(int(self.vm.maxmem)) self.max_mem_size.setValue(int(self.vm.maxmem))
self.max_mem_size.setMaximum(qubes_memory) self.max_mem_size.setMaximum(qubes_memory)
self.vcpus.setMinimum(1); self.vcpus.setMinimum(1)
self.vcpus.setMaximum(QubesHost().no_cpus) self.vcpus.setMaximum(QubesHost().no_cpus)
self.vcpus.setValue(int(self.vm.vcpus)) self.vcpus.setValue(int(self.vm.vcpus))
@ -646,9 +646,9 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
added.append(item) added.append(item)
if self.dev_list.selected_list.count() - len(added) < len(self.vm.pcidevs): #sth removed if self.dev_list.selected_list.count() - len(added) < len(self.vm.pcidevs): #sth removed
sth_changed = True; sth_changed = True
elif len(added) > 0: elif len(added) > 0:
sth_changed = True; sth_changed = True
if sth_changed == True: if sth_changed == True:
pcidevs = [] pcidevs = []
@ -667,7 +667,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
item = self.services_list.item(r) item = self.services_list.item(r)
if str(item.text()) == 'meminfo-writer': if str(item.text()) == 'meminfo-writer':
item.setCheckState(state) item.setCheckState(state)
break; break
if self.dev_list.selected_list.count() > 0: if self.dev_list.selected_list.count() > 0:
if state == QtCore.Qt.Checked: if state == QtCore.Qt.Checked: