Consume container output when it's not parsed

Revert run_command() logic to sending again stdout and stderr to
/dev/null (just as it was prior to commit d28aa5a). Fixes #316
This commit is contained in:
deeplow 2023-01-27 14:22:12 +00:00
parent 56b5b98f1e
commit bb6ee5d83f
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -48,7 +48,13 @@ def run_command(
"""
if stdout_callback is None and stderr_callback is None:
try:
subprocess.run(args, timeout=timeout, check=True)
subprocess.run(
args,
timeout=timeout,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
check=True,
)
except subprocess.CalledProcessError as e:
raise RuntimeError(error_message) from e
except subprocess.TimeoutExpired as e: