summaryrefslogtreecommitdiffstats
path: root/meta/classes/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/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/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass7
1 files changed, 2 insertions, 5 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 630e0e3d6e..6ef5450ef8 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -254,8 +254,6 @@ def check_supported_distro(sanity_data):
254 254
255# Checks we should only make if MACHINE is set correctly 255# Checks we should only make if MACHINE is set correctly
256def check_sanity_validmachine(sanity_data): 256def check_sanity_validmachine(sanity_data):
257 from bb import data
258
259 messages = "" 257 messages = ""
260 258
261 # Check TUNE_ARCH is set 259 # Check TUNE_ARCH is set
@@ -291,7 +289,6 @@ def check_sanity_validmachine(sanity_data):
291 289
292 290
293def check_sanity(sanity_data): 291def check_sanity(sanity_data):
294 from bb import note, error, data, __version__
295 import subprocess 292 import subprocess
296 293
297 try: 294 try:
@@ -319,8 +316,8 @@ def check_sanity(sanity_data):
319 if sys.hexversion < 0x020600F0: 316 if sys.hexversion < 0x020600F0:
320 messages = messages + 'The system requires at least Python 2.6 to run. Please update your Python interpreter.\n' 317 messages = messages + 'The system requires at least Python 2.6 to run. Please update your Python interpreter.\n'
321 318
322 if (LooseVersion(__version__) < LooseVersion(minversion)): 319 if (LooseVersion(bb.__version__) < LooseVersion(minversion)):
323 messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__) 320 messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__)
324 321
325 # Check that the MACHINE is valid, if it is set 322 # Check that the MACHINE is valid, if it is set
326 if sanity_data.getVar('MACHINE', True): 323 if sanity_data.getVar('MACHINE', True):