diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-18 13:08:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-19 12:24:50 +0100 |
commit | 73cf0335c463758379765fa5f26a4484afaca8a0 (patch) | |
tree | eed499207c71f925dfad21d1c4e58cbb1ec22d53 /meta/classes/sanity.bbclass | |
parent | 7b2c67874e03bc378c6def5cf1558238134e1b61 (diff) | |
download | ast2050-yocto-poky-73cf0335c463758379765fa5f26a4484afaca8a0.zip ast2050-yocto-poky-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/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 630e0e3..6ef5450 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -254,8 +254,6 @@ def check_supported_distro(sanity_data): # Checks we should only make if MACHINE is set correctly def check_sanity_validmachine(sanity_data): - from bb import data - messages = "" # Check TUNE_ARCH is set @@ -291,7 +289,6 @@ def check_sanity_validmachine(sanity_data): def check_sanity(sanity_data): - from bb import note, error, data, __version__ import subprocess try: @@ -319,8 +316,8 @@ def check_sanity(sanity_data): if sys.hexversion < 0x020600F0: messages = messages + 'The system requires at least Python 2.6 to run. Please update your Python interpreter.\n' - if (LooseVersion(__version__) < LooseVersion(minversion)): - messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__) + if (LooseVersion(bb.__version__) < LooseVersion(minversion)): + messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__) # Check that the MACHINE is valid, if it is set if sanity_data.getVar('MACHINE', True): |