mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
action_utils: Handle capture_output argument in run wrapper
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
e227e9a919
commit
c8f89e3ca5
@ -825,8 +825,10 @@ def run_as_user(command, username, **kwargs):
|
|||||||
|
|
||||||
def run(command, **kwargs):
|
def run(command, **kwargs):
|
||||||
"""Run subprocess.run but capture stdout and stderr in thread storage."""
|
"""Run subprocess.run but capture stdout and stderr in thread storage."""
|
||||||
collect_stdout = ('stdout' not in kwargs)
|
collect_stdout = ('stdout' not in kwargs
|
||||||
collect_stderr = ('stderr' not in kwargs)
|
and 'capture_output' not in kwargs)
|
||||||
|
collect_stderr = ('stderr' not in kwargs
|
||||||
|
and 'capture_output' not in kwargs)
|
||||||
|
|
||||||
if collect_stdout:
|
if collect_stdout:
|
||||||
kwargs['stdout'] = subprocess.PIPE
|
kwargs['stdout'] = subprocess.PIPE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user