From 1e45a4f72b16c7ab64f46907d2d2ee9cd749dc23 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Sun, 26 Mar 2017 20:39:22 +0300 Subject: 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 --- scripts/lib/wic/utils/misc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/lib/wic/utils/misc.py') 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) -- cgit v1.2.3