[virt-tools-list] [virt-manager PATCH 3/4] pep8 W503: line break before binary operator

Pavel Hrdina phrdina at redhat.com
Fri Jul 10 12:07:02 UTC 2015


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 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 bf0d11a..28daf02 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 ab13d7b..b07ae72 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 8401a7a..fad7b4b 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1332,8 +1332,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 653bd54..295c830 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 284d4a0..aa99e35 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 a7fe2de..54e059f 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 8b486d8..8518e57 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"),
-- 
2.4.5




More information about the virt-tools-list mailing list