u_boot_pylib: Add a function to run a single command
Add a helper to avoid needing to use a list within a list for this
simple case.
Update existing users of runpipe() to use this where possible.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 03eb7f8..9f6688e 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -345,8 +345,9 @@
Arguments to pass, as a list of strings
kwargs: Arguments to pass to Command.RunPipe()
"""
- result = command.run_pipe([[self._binman_pathname] + list(args)],
- capture=True, capture_stderr=True, raise_on_error=False)
+ all_args = [self._binman_pathname] + list(args)
+ result = command.run_one(*all_args, capture=True, capture_stderr=True,
+ raise_on_error=False)
if result.return_code and kwargs.get('raise_on_error', True):
raise Exception("Error running '%s': %s" % (' '.join(args),
result.stdout + result.stderr))