]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: Fix get_bbfiles()
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 May 2013 14:52:47 +0000 (14:52 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 12 May 2013 07:22:49 +0000 (08:22 +0100)
Its clear looking at the code the path argument has never been used and doesn't
work. Tweak the function to be a little more readable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index da598c933049ec5a99d31484c170e972e5e7e8db..85761e07c455615e7fb97147917fa753f2614ad3 100644 (file)
@@ -1419,14 +1419,14 @@ class CookerCollectFiles(object):
                 return pri
         return 0
 
-    def get_bbfiles(self, path = os.getcwd()):
+    def get_bbfiles(self):
         """Get list of default .bb files by reading out the current directory"""
+        path = os.getcwd()
         contents = os.listdir(path)
         bbfiles = []
         for f in contents:
-            (root, ext) = os.path.splitext(f)
-            if ext == ".bb":
-                bbfiles.append(os.path.abspath(os.path.join(os.getcwd(), f)))
+            if f.endswith(".bb"):
+                bbfiles.append(os.path.abspath(os.path.join(path, f)))
         return bbfiles
 
     def find_bbfiles(self, path):