utils: Update bb.which reference and other syntax cleanup

* bb.which -> bb.utiis.which()
* Use modern form of datastore access
* Use True, not 1
* Drop pointless imports

(From OE-Core rev: 106a4f5b41e5bdeabe588b9ba362f3693b1a9989)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-09-17 11:45:30 +00:00
parent 641a80d760
commit 1bf8d83d5a
1 changed files with 3 additions and 5 deletions

View File

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