mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user