From: Tom Zanussi Date: Fri, 18 Oct 2013 04:45:38 +0000 (-0500) Subject: wic: Initialize return values in find_artifacts() X-Git-Tag: 2015-4~4875 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=ce6c3ec0e5f4822e85b8f957e9e31fa9de438c55;p=openembedded-core.git 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 --- 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")