summaryrefslogtreecommitdiffstats
path: root/meta/classes/recipe_sanity.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-18 13:08:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-19 12:24:50 +0100
commit73cf0335c463758379765fa5f26a4484afaca8a0 (patch)
treeeed499207c71f925dfad21d1c4e58cbb1ec22d53 /meta/classes/recipe_sanity.bbclass
parent7b2c67874e03bc378c6def5cf1558238134e1b61 (diff)
downloadpoky-73cf0335c463758379765fa5f26a4484afaca8a0.tar.gz
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>
Diffstat (limited to 'meta/classes/recipe_sanity.bbclass')
-rw-r--r--meta/classes/recipe_sanity.bbclass5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/classes/recipe_sanity.bbclass b/meta/classes/recipe_sanity.bbclass
index 61e07bf043..63e9e7ff23 100644
--- a/meta/classes/recipe_sanity.bbclass
+++ b/meta/classes/recipe_sanity.bbclass
@@ -55,7 +55,6 @@ def can_use_autotools_base(cfgdata, d):
55 if cfg.find(i) != -1: 55 if cfg.find(i) != -1:
56 return False 56 return False
57 57
58 import os
59 for clsfile in d.getVar("__inherit_cache", 0): 58 for clsfile in d.getVar("__inherit_cache", 0):
60 (base, _) = os.path.splitext(os.path.basename(clsfile)) 59 (base, _) = os.path.splitext(os.path.basename(clsfile))
61 if cfg.find("%s_do_configure" % base) != -1: 60 if cfg.find("%s_do_configure" % base) != -1:
@@ -146,9 +145,7 @@ do_recipe_sanity_all () {
146addtask recipe_sanity_all after do_recipe_sanity 145addtask recipe_sanity_all after do_recipe_sanity
147 146
148python recipe_sanity_eh () { 147python recipe_sanity_eh () {
149 from bb.event import getName 148 if bb.event.getName(e) != "ConfigParsed":
150
151 if getName(e) != "ConfigParsed":
152 return 149 return
153 150
154 d = e.data 151 d = e.data