diff options
Diffstat (limited to 'scripts/lib/wic/utils/misc.py')
-rw-r--r-- | scripts/lib/wic/utils/misc.py | 14 |
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 | ||
62 | def _exec_cmd(cmd_and_args, as_shell=False, catch=3): | 62 | def _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 | ||
87 | def exec_cmd(cmd_and_args, as_shell=False, catch=3): | 87 | def 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 | ||
94 | def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""): | 94 | def 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) |