diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 10:45:23 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 10:45:23 +0000 |
commit | bc465d83ad8665211b6f9664b418f4eafcc5ca6c (patch) | |
tree | 6e46f3cb3096127f0df9825f1670482da199fc9e /classes/sanity.bbclass | |
parent | d762c7504032becb9d05cd48c86dabb1ec764911 (diff) |
classes: Drop a number of unneeded import calls (from Poky)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'classes/sanity.bbclass')
-rw-r--r-- | classes/sanity.bbclass | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 83c03299bf..f65df61c1d 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -11,8 +11,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 +24,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) @@ -193,10 +191,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 |