]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: exec_native_cmd: fix undefined variable error
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 21 Feb 2017 10:01:59 +0000 (12:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 Mar 2017 10:42:32 +0000 (10:42 +0000)
Defined variable 'out' to fix this exception:
UnboundLocalError: local variable 'out' referenced before assignment

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
scripts/lib/wic/utils/misc.py

index 6769e3936d18435752a031cd2fbe6edfb19a4591..216ab7b6ce43e2fcb57624015afb36a599c1532f 100644 (file)
@@ -121,6 +121,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
         ret, out = _exec_cmd(native_cmd_and_args, True, catch)
     else:
         ret = 127
+        out = "can't find native executable %s in %s" % (args[0], native_paths)
 
     prog = args[0]
     # shell command-not-found