summaryrefslogtreecommitdiffstats
path: root/scripts
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:24 +0100
commit307d0e13c08d0c9dc43170eb259be7a30ea67529 (patch)
treeaa08ac36d014d2c612d2ae4d9fb47301c7eac302 /scripts
parent567fec4b0d20827340eb715decacb4529300ca61 (diff)
downloadpoky-307d0e13c08d0c9dc43170eb259be7a30ea67529.tar.gz
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. (From OE-Core rev: a3ee9cc7aebaecfa2223552a2c1865a9337de664) 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')
-rw-r--r--scripts/lib/image/engine.py7
-rw-r--r--scripts/lib/mic/plugin.py7
2 files changed, 8 insertions, 6 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):
96 layers_path = get_bitbake_var("BBLAYERS") 96 layers_path = get_bitbake_var("BBLAYERS")
97 canned_wks_layer_dirs = [] 97 canned_wks_layer_dirs = []
98 98
99 for layer_path in layers_path.split(): 99 if layers_path is not None:
100 path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR) 100 for layer_path in layers_path.split():
101 canned_wks_layer_dirs.append(path) 101 path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
102 canned_wks_layer_dirs.append(path)
102 103
103 path = os.path.join(dl, CANNED_IMAGE_DIR) 104 path = os.path.join(dl, CANNED_IMAGE_DIR)
104 canned_wks_layer_dirs.append(path) 105 canned_wks_layer_dirs.append(path)
diff --git a/scripts/lib/mic/plugin.py b/scripts/lib/mic/plugin.py
index dec0e5bf84..585fd6d563 100644
--- a/scripts/lib/mic/plugin.py
+++ b/scripts/lib/mic/plugin.py
@@ -53,9 +53,10 @@ class PluginMgr(object):
53 self.layers_path = get_bitbake_var("BBLAYERS") 53 self.layers_path = get_bitbake_var("BBLAYERS")
54 layer_dirs = [] 54 layer_dirs = []
55 55
56 for layer_path in self.layers_path.split(): 56 if self.layers_path is not None:
57 path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype) 57 for layer_path in self.layers_path.split():
58 layer_dirs.append(path) 58 path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype)
59 layer_dirs.append(path)
59 60
60 path = os.path.join(dl, ptype) 61 path = os.path.join(dl, ptype)
61 layer_dirs.append(path) 62 layer_dirs.append(path)