]> code.ossystems Code Review - openembedded-core.git/commitdiff
utils: Update bb.which reference and other syntax cleanup
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Sep 2013 11:45:30 +0000 (11:45 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Sep 2013 13:11:59 +0000 (14:11 +0100)
* bb.which -> bb.utiis.which()
* Use modern form of datastore access
* Use True, not 1
* Drop pointless imports

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/utils.bbclass

index e873c539c55b31656a14bc9ef1b8af8c8d723b76..d1f6563a0a28163b03788a67096dcbb745be99cf 100644 (file)
@@ -293,11 +293,9 @@ END
 }
 
 def check_app_exists(app, d):
-    from bb import which, data
-
-    app = data.expand(app, d)
-    path = data.getVar('PATH', d, 1)
-    return bool(which(path, app))
+    app = d.expand(app)
+    path = d.getVar('PATH', d, True)
+    return bool(bb.utils.which(path, app))
 
 def explode_deps(s):
     return bb.utils.explode_deps(s)