From ce6c3ec0e5f4822e85b8f957e9e31fa9de438c55 Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Thu, 17 Oct 2013 23:45:38 -0500 Subject: wic: Initialize return values in find_artifacts() If one of these isn't found, it won't be initialized and will throw an UnboundLocalError. Signed-off-by: Tom Zanussi Signed-off-by: Richard Purdie --- scripts/lib/image/engine.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/lib/image') 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): print "Couldn't get '%s' output, exiting." % bitbake_env_cmd sys.exit(1) + rootfs_dir = kernel_dir = hdddir = staging_data_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") -- cgit 1.2.3-korg