diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-08 22:32:43 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:28 +0000 |
commit | c54117458a19d05d404ec00907a8f3e9c73a416b (patch) | |
tree | 6cc5695742a1198668b022b35c8b2a456c4f3f4f /meta/classes/sanity.bbclass | |
parent | 80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff) | |
download | openembedded-core-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.gz openembedded-core-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.bz2 openembedded-core-c54117458a19d05d404ec00907a8f3e9c73a416b.zip |
classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index e11bdd2218..39f1e22003 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -3,7 +3,6 @@ # def raise_sanity_error(msg): - import bb bb.fatal(""" Poky's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: @@ -11,8 +10,6 @@ def raise_sanity_error(msg): %s""" % msg) def check_conf_exists(fn, data): - import bb, os - bbpath = [] fn = bb.data.expand(fn, data) vbbpath = bb.data.getVar("BBPATH", data) @@ -26,12 +23,12 @@ def check_conf_exists(fn, data): def check_sanity(e): from bb import note, error, data, __version__ - from bb.event import Handled, NotHandled, getName + try: from distutils.version import LooseVersion except ImportError: def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 - import os, commands + import commands # Check the bitbake version meets minimum requirements minversion = data.getVar('BB_MIN_VERSION', e.data , True) @@ -163,10 +160,8 @@ def check_sanity(e): addhandler check_sanity_eventhandler python check_sanity_eventhandler() { - from bb import note, error, data, __version__ - from bb.event import getName - - if getName(e) == "ConfigParsed": + from bb.event import Handled, NotHandled + if bb.event.getName(e) == "ConfigParsed": check_sanity(e) return NotHandled |