[elbe-devel] [PATCH 04/25] pylint - elbeproject: remove unneeded else

Manuel Traut manut at linutronix.de
Wed Aug 29 21:02:34 CEST 2018


else after return is not needed, remove it to make pylint happy,
  however IMHO it doesn't improve readability of the code, but
  that's maybe a personal thing.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/elbeproject.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 1469aff6..98c0c63a 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -733,14 +733,14 @@ class ElbeProject (object):
                                            "etc", "elbe_version")
             if os.path.isfile(elbeversionpath):
                 return True
-            else:
-                self.log.printo("%s exists, but it does not have "
-                                "an etc/elbe_version file." % self.chrootpath)
-                # Apparently we do not have a functional build environment
-                return False
-        else:
+
+            self.log.printo("%s exists, but it does not have "
+                            "an etc/elbe_version file." % self.chrootpath)
+            # Apparently we do not have a functional build environment
             return False
 
+        return False
+
     def set_xml(self, xmlpath):
         # Use supplied XML file, if given, otherwise change to source.xml
         if not xmlpath:
-- 
2.18.0




More information about the elbe-devel mailing list