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:05 +0100 |
commit | 7d674820958be3a7051ea619effe1a6061d9cbe2 (patch) | |
tree | 5ca9163652717746c8c79a88dbd0bcb047eea558 /meta/classes/base.bbclass | |
parent | ca30b6587841f5e9a42aaedb8e0b89ff5a4a6a37 (diff) | |
download | openembedded-core-contrib-7d674820958be3a7051ea619effe1a6061d9cbe2.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index f3587bcbef..1f7602394e 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -14,7 +14,7 @@ OE_IMPORTS += "os sys time oe.path oe.utils oe.data oe.packagegroup oe.sstatesig OE_IMPORTS[type] = "list" def oe_import(d): - import os, sys + import sys bbpath = d.getVar("BBPATH", True).split(":") sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath] @@ -117,11 +117,9 @@ GIT_CONFIG_PATH = "${STAGING_DIR_NATIVE}/etc" GIT_CONFIG = "${GIT_CONFIG_PATH}/gitconfig" def generate_git_config(e): - from bb import data - - if data.getVar('GIT_CORE_CONFIG', e.data, True): + if e.data.getVar('GIT_CORE_CONFIG', True): gitconfig_path = e.data.getVar('GIT_CONFIG', True) - proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True) + proxy_command = " gitProxy = %s\n" % e.data.getVar('OE_GIT_PROXY_COMMAND', True) bb.mkdirhier(e.data.expand("${GIT_CONFIG_PATH}")) if (os.path.exists(gitconfig_path)): @@ -129,7 +127,7 @@ def generate_git_config(e): f = open(gitconfig_path, 'w') f.write("[core]\n") - ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, True).split() + ignore_hosts = e.data.getVar('GIT_PROXY_IGNORE', True).split() for ignore_host in ignore_hosts: f.write(" gitProxy = none for %s\n" % ignore_host) f.write(proxy_command) |