summaryrefslogtreecommitdiff
path: root/scripts/lib/image
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-06-03 22:28:03 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-06 10:29:22 +0100
commita3ee9cc7aebaecfa2223552a2c1865a9337de664 (patch)
tree714ee86c8c4571357b44b3ac835efc6cf303429b /scripts/lib/image
parentba88329115a3d6f964febcbf554af8391e1b84a1 (diff)
downloadopenembedded-core-a3ee9cc7aebaecfa2223552a2c1865a9337de664.tar.gz
openembedded-core-a3ee9cc7aebaecfa2223552a2c1865a9337de664.tar.bz2
openembedded-core-a3ee9cc7aebaecfa2223552a2c1865a9337de664.zip
wic: check if BBLAYERS is valid before use
If wic is running as raw mode, it's better to check if BBLAYERS is valid before inspect it. No functional changes. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/image')
-rw-r--r--scripts/lib/image/engine.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 3bda1bf205..1256236304 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -96,9 +96,10 @@ def build_canned_image_list(dl):
layers_path = get_bitbake_var("BBLAYERS")
canned_wks_layer_dirs = []
- for layer_path in layers_path.split():
- path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
- canned_wks_layer_dirs.append(path)
+ if layers_path is not None:
+ for layer_path in layers_path.split():
+ path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
+ canned_wks_layer_dirs.append(path)
path = os.path.join(dl, CANNED_IMAGE_DIR)
canned_wks_layer_dirs.append(path)