Remove a number of unneeded import os/bb calls

The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.

(From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2012-07-18 13:08:48 +00:00
parent 7b2c67874e
commit 73cf0335c4
43 changed files with 58 additions and 135 deletions

View File

@@ -55,7 +55,6 @@ def can_use_autotools_base(cfgdata, d):
if cfg.find(i) != -1:
return False
import os
for clsfile in d.getVar("__inherit_cache", 0):
(base, _) = os.path.splitext(os.path.basename(clsfile))
if cfg.find("%s_do_configure" % base) != -1:
@@ -146,9 +145,7 @@ do_recipe_sanity_all () {
addtask recipe_sanity_all after do_recipe_sanity
python recipe_sanity_eh () {
from bb.event import getName
if getName(e) != "ConfigParsed":
if bb.event.getName(e) != "ConfigParsed":
return
d = e.data