mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-10 01:18:03 +03:00
pep8 W503: line break before binary operator
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
349220d188
commit
c7049eb120
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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":
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user