From 3ad27d46b3d478e3f0a5334d41cb4327af161d5b Mon Sep 17 00:00:00 2001 From: deeplow Date: Fri, 27 Jan 2023 14:22:12 +0000 Subject: [PATCH] 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 --- container/dangerzone.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/container/dangerzone.py b/container/dangerzone.py index f888ee55e..9d6efdc2d 100644 --- a/container/dangerzone.py +++ b/container/dangerzone.py @@ -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: