diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2013-10-17 23:45:38 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-18 15:58:16 +0100 |
commit | 67378fbcbe8a418c81ef42589fb6fba704c36bdf (patch) | |
tree | baddd692fa94144748be25f1910a42898d5454e0 | |
parent | e22efb497a425845362f29a987b377067cf6034e (diff) | |
download | poky-67378fbcbe8a418c81ef42589fb6fba704c36bdf.tar.gz |
wic: Initialize return values in find_artifacts()
If one of these isn't found, it won't be initialized and will throw an
UnboundLocalError.
(From OE-Core rev: ce6c3ec0e5f4822e85b8f957e9e31fa9de438c55)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/image/engine.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index be29222df1..b3a9c7486e 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py | |||
@@ -82,6 +82,8 @@ def find_artifacts(image_name): | |||
82 | print "Couldn't get '%s' output, exiting." % bitbake_env_cmd | 82 | print "Couldn't get '%s' output, exiting." % bitbake_env_cmd |
83 | sys.exit(1) | 83 | sys.exit(1) |
84 | 84 | ||
85 | rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = "" | ||
86 | |||
85 | for line in bitbake_env_lines.split('\n'): | 87 | for line in bitbake_env_lines.split('\n'): |
86 | if (get_line_val(line, "IMAGE_ROOTFS")): | 88 | if (get_line_val(line, "IMAGE_ROOTFS")): |
87 | rootfs_dir = get_line_val(line, "IMAGE_ROOTFS") | 89 | rootfs_dir = get_line_val(line, "IMAGE_ROOTFS") |