pep8 W503: line break before binary operator

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2015-07-10 14:07:02 +02:00 committed by Cole Robinson
parent 349220d188
commit c7049eb120
7 changed files with 20 additions and 20 deletions

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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":

View File

@ -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

View File

@ -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

View File

@ -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"),