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/buildman/builder.py b/tools/buildman/builder.py
index cbf1345..3eac17a 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -510,7 +510,7 @@
stage: Stage that we are at (mrproper, config, oldconfig, build)
cwd: Directory where make should be run
args: Arguments to pass to make
- kwargs: Arguments to pass to command.run_pipe()
+ kwargs: Arguments to pass to command.run_one()
"""
def check_output(stream, data):
@@ -531,11 +531,12 @@
return False
self._restarting_config = False
- self._terminated = False
+ self._terminated = False
cmd = [self.gnu_make] + list(args)
- result = command.run_pipe([cmd], capture=True, capture_stderr=True,
- cwd=cwd, raise_on_error=False, infile='/dev/null',
- output_func=check_output, **kwargs)
+ result = command.run_one(*cmd, capture=True, capture_stderr=True,
+ cwd=cwd, raise_on_error=False,
+ infile='/dev/null', output_func=check_output,
+ **kwargs)
if self._terminated:
# Try to be helpful