From 3ea49b51921e84c28def33031c2ca0a07e68073c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 23 Feb 2014 00:44:08 +0100 Subject: [PATCH] Remove trailing semicolons --- qubesmanager/appmenu_select.py | 4 ++-- qubesmanager/backup.py | 2 +- qubesmanager/log_dialog.py | 4 ++-- qubesmanager/main.py | 8 ++++---- qubesmanager/mount_for_backup.sh | 6 +++--- qubesmanager/multiselectwidget.py | 2 +- qubesmanager/settings.py | 12 ++++++------ 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/qubesmanager/appmenu_select.py b/qubesmanager/appmenu_select.py index 4a00b33..d1cacc8 100755 --- a/qubesmanager/appmenu_select.py +++ b/qubesmanager/appmenu_select.py @@ -120,9 +120,9 @@ class AppmenuSelectManager: added.append(item) 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: - sth_changed = True; + sth_changed = True if sth_changed == True: whitelisted = open(self.vm.dir_path + '/' + whitelisted_filename, 'w') diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 67b0967..640096f 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -197,7 +197,7 @@ class BackupVMsWindow(Ui_Backup, QWizard): def shutdown_all_running_selected(self): (names, vms) = self.get_running_vms() if len(vms) == 0: - return; + return for vm in vms: self.blk_manager.check_if_serves_as_backend(vm) diff --git a/qubesmanager/log_dialog.py b/qubesmanager/log_dialog.py index f817b04..4603bf2 100644 --- a/qubesmanager/log_dialog.py +++ b/qubesmanager/log_dialog.py @@ -65,8 +65,8 @@ def copy_text_to_qubes_clipboard(text): #inter-appviewer lock try: - fd = os.open("/var/run/qubes/appviewer.lock", os.O_RDWR|os.O_CREAT, 0600); - fcntl.flock(fd, fcntl.LOCK_EX); + fd = os.open("/var/run/qubes/appviewer.lock", os.O_RDWR|os.O_CREAT, 0600) + fcntl.flock(fd, fcntl.LOCK_EX) except IOError: QMessageBox.warning (None, "Warning!", "Error while accessing Qubes clipboard!") return diff --git a/qubesmanager/main.py b/qubesmanager/main.py index b8b2ee5..d16c4f1 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -415,7 +415,7 @@ class VmUsageBarWidget (QWidget): self.widget = QProgressBar() self.widget.setMinimum(min) self.widget.setMaximum(max) - self.widget.setFormat(format); + self.widget.setFormat(format) self.widget.setStyleSheet( "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["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.action_netvm.setChecked(False) self.table.setColumnHidden( self.columns_indices["CPU Graph"], True) @@ -1756,7 +1756,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): for c in self.columns_actions: if not self.columns_actions[c].isEnabled(): self.columns_actions[c].setEnabled(True) - break; + break if self.settings_loaded: 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: w = int(line[0].strip())+ int(line[1].strip()) h = int(line[2].strip())+ int(line[3].strip()) - break; + break #in case of some weird window managers we have to assume sth... if w<= 0: w = 10 diff --git a/qubesmanager/mount_for_backup.sh b/qubesmanager/mount_for_backup.sh index 15d05f2..6bdadc5 100755 --- a/qubesmanager/mount_for_backup.sh +++ b/qubesmanager/mount_for_backup.sh @@ -20,15 +20,15 @@ fi if sudo cryptsetup isLuks $1 ; then # Is a luks device if ! $PROMPT "Please unlock the LUKS-encrypted $1 device:" | sudo pmount $1 $2 ; then - exit 1; + exit 1 fi else #not luks! if ! sudo pmount $1 $2 ; then - exit 1; + exit 1 fi fi #all ok :) -exit 0; +exit 0 diff --git a/qubesmanager/multiselectwidget.py b/qubesmanager/multiselectwidget.py index e4281d0..2f3eb63 100644 --- a/qubesmanager/multiselectwidget.py +++ b/qubesmanager/multiselectwidget.py @@ -11,7 +11,7 @@ class MultiSelectWidget(Ui_MultiSelectWidget, QWidget): def __init__(self, parent=None): super(MultiSelectWidget, self).__init__() - self.setupUi(self); + self.setupUi(self) self.add_selected_button.clicked.connect(self.add_selected) self.add_all_button.clicked.connect(self.add_all) self.remove_selected_button.clicked.connect(self.remove_selected) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index 344aeb6..8e3fee9 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -294,12 +294,12 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): #networking info 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.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") else: - self.networking_groupbox.setEnabled(False); + self.networking_groupbox.setEnabled(False) #max priv storage 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.setMaximum(qubes_memory) - self.vcpus.setMinimum(1); + self.vcpus.setMinimum(1) self.vcpus.setMaximum(QubesHost().no_cpus) self.vcpus.setValue(int(self.vm.vcpus)) @@ -646,9 +646,9 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): added.append(item) 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: - sth_changed = True; + sth_changed = True if sth_changed == True: pcidevs = [] @@ -667,7 +667,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): item = self.services_list.item(r) if str(item.text()) == 'meminfo-writer': item.setCheckState(state) - break; + break if self.dev_list.selected_list.count() > 0: if state == QtCore.Qt.Checked: