summaryrefslogtreecommitdiffstats
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-04-01 08:14:57 +0100
commitad1bce56c43cf4758b4974f95736cfef3840c246 (patch)
tree3b0b201eed1f7a1a41acc0d5938252e4f6b1a42f /scripts/lib/wic/utils/misc.py
parentd39a1588556d0063ac9c2dd7ed310826db41e677 (diff)
downloadpoky-ad1bce56c43cf4758b4974f95736cfef3840c246.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] (From OE-Core rev: 1e45a4f72b16c7ab64f46907d2d2ee9cd749dc23) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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",
59 "syslinux": "syslinux" 59 "syslinux": "syslinux"
60 } 60 }
61 61
62def _exec_cmd(cmd_and_args, as_shell=False, catch=3): 62def _exec_cmd(cmd_and_args, as_shell=False):
63 """ 63 """
64 Execute command, catching stderr, stdout 64 Execute command, catching stderr, stdout
65 65
@@ -70,9 +70,9 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
70 logger.debug(args) 70 logger.debug(args)
71 71
72 if as_shell: 72 if as_shell:
73 ret, out = runner.runtool(cmd_and_args, catch) 73 ret, out = runner.runtool(cmd_and_args)
74 else: 74 else:
75 ret, out = runner.runtool(args, catch) 75 ret, out = runner.runtool(args)
76 out = out.strip() 76 out = out.strip()
77 if ret != 0: 77 if ret != 0:
78 raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \ 78 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):
84 return ret, out 84 return ret, out
85 85
86 86
87def exec_cmd(cmd_and_args, as_shell=False, catch=3): 87def exec_cmd(cmd_and_args, as_shell=False):
88 """ 88 """
89 Execute command, return output 89 Execute command, return output
90 """ 90 """
91 return _exec_cmd(cmd_and_args, as_shell, catch)[1] 91 return _exec_cmd(cmd_and_args, as_shell)[1]
92 92
93 93
94def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""): 94def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
95 """ 95 """
96 Execute native command, catching stderr, stdout 96 Execute native command, catching stderr, stdout
97 97
@@ -118,7 +118,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
118 118
119 # If the command isn't in the native sysroot say we failed. 119 # If the command isn't in the native sysroot say we failed.
120 if spawn.find_executable(args[0], native_paths): 120 if spawn.find_executable(args[0], native_paths):
121 ret, out = _exec_cmd(native_cmd_and_args, True, catch) 121 ret, out = _exec_cmd(native_cmd_and_args, True)
122 else: 122 else:
123 ret = 127 123 ret = 127
124 out = "can't find native executable %s in %s" % (args[0], native_paths) 124 out = "can't find native executable %s in %s" % (args[0], native_paths)