aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/utils/misc.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-03-26 20:39:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-31 12:12:15 +0100
commit1e45a4f72b16c7ab64f46907d2d2ee9cd749dc23 (patch)
tree5c9a8394738cb0d0f0d5e85c4c81da817d3b4e6d /scripts/lib/wic/utils/misc.py
parent9749336c37249af99c92478c3e4dc8821cb9a816 (diff)
downloadopenembedded-core-1e45a4f72b16c7ab64f46907d2d2ee9cd749dc23.tar.gz
wic: remove unused code from runner module
Removed unused APIs 'outs' and 'quiet'. Removed 'catch' parameter from runner.runtool API as wic uses only one value of it. Removed the code that handles unused values of 'catch' parameter. [YOCTO #10618] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/wic/utils/misc.py')
-rw-r--r--scripts/lib/wic/utils/misc.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index c941112c63..307779aad5 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -59,7 +59,7 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools",
"syslinux": "syslinux"
}
-def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
+def _exec_cmd(cmd_and_args, as_shell=False):
"""
Execute command, catching stderr, stdout
@@ -70,9 +70,9 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
logger.debug(args)
if as_shell:
- ret, out = runner.runtool(cmd_and_args, catch)
+ ret, out = runner.runtool(cmd_and_args)
else:
- ret, out = runner.runtool(args, catch)
+ ret, out = runner.runtool(args)
out = out.strip()
if ret != 0:
raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \
@@ -84,14 +84,14 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
return ret, out
-def exec_cmd(cmd_and_args, as_shell=False, catch=3):
+def exec_cmd(cmd_and_args, as_shell=False):
"""
Execute command, return output
"""
- return _exec_cmd(cmd_and_args, as_shell, catch)[1]
+ return _exec_cmd(cmd_and_args, as_shell)[1]
-def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
+def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
"""
Execute native command, catching stderr, stdout
@@ -118,7 +118,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
# If the command isn't in the native sysroot say we failed.
if spawn.find_executable(args[0], native_paths):
- ret, out = _exec_cmd(native_cmd_and_args, True, catch)
+ ret, out = _exec_cmd(native_cmd_and_args, True)
else:
ret = 127
out = "can't find native executable %s in %s" % (args[0], native_paths)