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>
This commit is contained in:
Simon Glass
2025-02-03 09:26:45 -07:00
committed by Tom Rini
parent f8456c91aa
commit 3d094ce28a
11 changed files with 84 additions and 75 deletions

View File

@@ -376,7 +376,7 @@ def run_result(name, *args, **kwargs):
args = tuple(extra_args) + args
name = os.path.expanduser(name) # Expand paths containing ~
all_args = (name,) + args
result = command.run_pipe([all_args], capture=True, capture_stderr=True,
result = command.run_one(*all_args, capture=True, capture_stderr=True,
env=env, raise_on_error=False, binary=binary)
if result.return_code:
if raise_on_error: