mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
wic: code cleanup: wildcard imports
Here is what PEP8(Style Guide for Python Code) says about this: Wildcard imports (from <module> import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools. (From OE-Core rev: 13416c1941f5dc8abcdb0073f2104a89eae2d6f1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1d0c3387e8
commit
f2a0a98523
@@ -42,7 +42,7 @@ from wic.utils import cmdln, misc, errors
|
||||
from wic.conf import configmgr
|
||||
from wic.plugin import pluginmgr
|
||||
from wic.__version__ import VERSION
|
||||
from wic.utils.oe.misc import *
|
||||
from wic.utils.oe import misc
|
||||
|
||||
|
||||
def verify_build_env():
|
||||
@@ -65,19 +65,19 @@ def find_artifacts(image_name):
|
||||
Gather the build artifacts for the current image (the image_name
|
||||
e.g. core-image-minimal) for the current MACHINE set in local.conf
|
||||
"""
|
||||
bitbake_env_lines = get_bitbake_env_lines()
|
||||
bitbake_env_lines = misc.get_bitbake_env_lines()
|
||||
|
||||
rootfs_dir = kernel_dir = bootimg_dir = native_sysroot = ""
|
||||
|
||||
for line in bitbake_env_lines.split('\n'):
|
||||
if (get_line_val(line, "IMAGE_ROOTFS")):
|
||||
rootfs_dir = get_line_val(line, "IMAGE_ROOTFS")
|
||||
if (misc.get_line_val(line, "IMAGE_ROOTFS")):
|
||||
rootfs_dir = misc.get_line_val(line, "IMAGE_ROOTFS")
|
||||
continue
|
||||
if (get_line_val(line, "DEPLOY_DIR_IMAGE")):
|
||||
kernel_dir = get_line_val(line, "DEPLOY_DIR_IMAGE")
|
||||
if (misc.get_line_val(line, "DEPLOY_DIR_IMAGE")):
|
||||
kernel_dir = misc.get_line_val(line, "DEPLOY_DIR_IMAGE")
|
||||
continue
|
||||
if (get_line_val(line, "STAGING_DIR_NATIVE")):
|
||||
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
|
||||
if (misc.get_line_val(line, "STAGING_DIR_NATIVE")):
|
||||
native_sysroot = misc.get_line_val(line, "STAGING_DIR_NATIVE")
|
||||
continue
|
||||
|
||||
return (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot)
|
||||
@@ -87,7 +87,7 @@ CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
|
||||
SCRIPTS_CANNED_IMAGE_DIR = "scripts/" + CANNED_IMAGE_DIR
|
||||
|
||||
def build_canned_image_list(dl):
|
||||
layers_path = get_bitbake_var("BBLAYERS")
|
||||
layers_path = misc.get_bitbake_var("BBLAYERS")
|
||||
canned_wks_layer_dirs = []
|
||||
|
||||
if layers_path is not None:
|
||||
|
||||
Reference in New Issue
Block a user