[yocto] [layerindex-web][PATCH 10/10] recipeparse: remove unnecessary else statement.

Liam R. Howlett Liam.Howlett at windriver.com
Mon Sep 26 11:25:38 PDT 2016


Code clean up.

Signed-off-by: Liam R. Howlett <Liam.Howlett at WindRiver.com>
---
 layerindex/recipeparse.py | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py
index 8a63117..8cf75a1 100644
--- a/layerindex/recipeparse.py
+++ b/layerindex/recipeparse.py
@@ -142,15 +142,14 @@ def detect_file_type(path, subdir_start):
         if res:
             typename = 'machine'
             return (typename, None, res.group(1))
-        else:
-            res = bbclass_re.match(subpath)
-            if res:
-                typename = 'bbclass'
-                return (typename, None, res.group(1))
-            res = distro_conf_re.match(subpath)
-            if res:
-                typename = 'distribution'
-                return (typename, None, res.group(1))
+        res = bbclass_re.match(subpath)
+        if res:
+            typename = 'bbclass'
+            return (typename, None, res.group(1))
+        res = distro_conf_re.match(subpath)
+        if res:
+            typename = 'distribution'
+            return (typename, None, res.group(1))
 
     if typename == 'recipe' or typename == 'bbappend':
         if subdir_start:
-- 
1.9.1




More information about the yocto mailing list