From c7049eb120002612d5bd0f5fffaedf568665de77 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Fri, 10 Jul 2015 14:07:02 +0200 Subject: [PATCH] pep8 W503: line break before binary operator Signed-off-by: Pavel Hrdina --- virtManager/clone.py | 4 ++-- virtManager/console.py | 12 ++++++------ virtManager/create.py | 4 ++-- virtManager/storagebrowse.py | 4 ++-- virtconv/vmx.py | 4 ++-- virtinst/diskbackend.py | 4 ++-- virtinst/network.py | 8 ++++---- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/virtManager/clone.py b/virtManager/clone.py index bf0d11a14..28daf0298 100644 --- a/virtManager/clone.py +++ b/virtManager/clone.py @@ -455,8 +455,8 @@ class vmmCloneVM(vmmGObjectUI): newpath = self.generate_clone_path_name(origpath, newname) row[STORAGE_INFO_NEW_PATH] = newpath except Exception, e: - logging.debug("Generating new path from clone name failed: " - + str(e)) + logging.debug("Generating new path from clone name failed: " + + str(e)) def build_storage_entry(self, disk, storage_box): origpath = disk[STORAGE_INFO_ORIG_PATH] diff --git a/virtManager/console.py b/virtManager/console.py index ab13d7b75..b07ae7211 100644 --- a/virtManager/console.py +++ b/virtManager/console.py @@ -428,14 +428,14 @@ class vmmConsolePages(vmmGObjectUI): fs = self.widget("control-fullscreen").get_active() scale_type = self.vm.get_console_scaling() - if (scale_type == self.config.CONSOLE_SCALE_NEVER - and curscale is True): + if (scale_type == self.config.CONSOLE_SCALE_NEVER and + curscale is True): self._viewer.console_set_scaling(False) - elif (scale_type == self.config.CONSOLE_SCALE_ALWAYS - and curscale is False): + elif (scale_type == self.config.CONSOLE_SCALE_ALWAYS and + curscale is False): self._viewer.console_set_scaling(True) - elif (scale_type == self.config.CONSOLE_SCALE_FULLSCREEN - and curscale != fs): + elif (scale_type == self.config.CONSOLE_SCALE_FULLSCREEN and + curscale != fs): self._viewer.console_set_scaling(fs) # Refresh viewer size diff --git a/virtManager/create.py b/virtManager/create.py index 1005398c5..ba56b815b 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -1333,8 +1333,8 @@ class vmmCreate(vmmGObjectUI): if self.have_startup_error: return - if (curpage == PAGE_INSTALL and self.should_detect_media() - and self.get_config_detectable_media()): + if (curpage == PAGE_INSTALL and self.should_detect_media() and + self.get_config_detectable_media()): # Make sure we have detected the OS before validating the page self.detect_media_os(forward=True) return diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py index 653bd54a3..295c8306a 100644 --- a/virtManager/storagebrowse.py +++ b/virtManager/storagebrowse.py @@ -138,8 +138,8 @@ class vmmStorageBrowser(vmmGObjectUI): self._finish(volume.get_target_path()) def _vol_sensitive_cb(self, fmt): - if ((self._browse_reason == self.config.CONFIG_DIR_FS) - and fmt != 'dir'): + if ((self._browse_reason == self.config.CONFIG_DIR_FS) and + fmt != 'dir'): return False elif self._stable_defaults: if fmt == "vmdk": diff --git a/virtconv/vmx.py b/virtconv/vmx.py index 284d4a0c9..aa99e35d4 100644 --- a/virtconv/vmx.py +++ b/virtconv/vmx.py @@ -290,8 +290,8 @@ class vmx_parser(parser_class): continue # vmx files often have dross left in path for CD entries - if (disk.path is None - or disk.path.lower() == "auto detect" or + if (disk.path is None or + disk.path.lower() == "auto detect" or not os.path.exists(disk.path)): disk.path = None diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py index a7fe2de0f..54e059f6d 100644 --- a/virtinst/diskbackend.py +++ b/virtinst/diskbackend.py @@ -56,8 +56,8 @@ def _lookup_vol_by_path(conn, path): vol.info() return vol, None except libvirt.libvirtError, e: - if (hasattr(libvirt, "VIR_ERR_NO_STORAGE_VOL") - and e.get_error_code() != libvirt.VIR_ERR_NO_STORAGE_VOL): + if (hasattr(libvirt, "VIR_ERR_NO_STORAGE_VOL") and + e.get_error_code() != libvirt.VIR_ERR_NO_STORAGE_VOL): raise return None, e diff --git a/virtinst/network.py b/virtinst/network.py index 8b486d852..8518e57fb 100644 --- a/virtinst/network.py +++ b/virtinst/network.py @@ -95,12 +95,12 @@ class _NetworkBandwidth(XMLBuilder): outbound_burst = XMLProperty("./outbound/@burst") def is_inbound(self): - return bool(self.inbound_average or self.inbound_peak - or self.inbound_burst or self.inbound_floor) + return bool(self.inbound_average or self.inbound_peak or + self.inbound_burst or self.inbound_floor) def is_outbound(self): - return bool(self.outbound_average or self.outbound_peak - or self.outbound_burst) + return bool(self.outbound_average or self.outbound_peak or + self.outbound_burst) def pretty_desc(self, inbound=True, outbound=True): items_in = [(self.inbound_average, _("Average"), "KiB/s"),