Skip to content

Commit

Permalink
Consume container output when it's not parsed
Browse files Browse the repository at this point in the history
Revert run_command() logic to sending again stdout and stderr to
/dev/null (just as it was prior to commit d28aa5a). Fixes #316
  • Loading branch information
deeplow committed Jan 27, 2023
1 parent 56b5b98 commit 3ad27d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion container/dangerzone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3ad27d4

Please sign in to comment.