[OE-core] [PATCH 4/6] wic: exec_native_cmd: fix undefined variable error

Ed Bartosh ed.bartosh at linux.intel.com
Tue Feb 21 15:23:09 UTC 2017


Defined variable 'out' to fix this exception:
UnboundLocalError: local variable 'out' referenced before assignment

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 scripts/lib/wic/utils/misc.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 6769e39..216ab7b 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -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
-- 
2.1.4




More information about the Openembedded-core mailing list