Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions webhook_server_container/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ def run_command(
timeout=timeout,
**kwargs,
)
out_decoded = sub_process.stdout.decode() if isinstance(sub_process.stdout, bytes) else sub_process.stdout
err_decoded = sub_process.stderr.decode() if isinstance(sub_process.stderr, bytes) else sub_process.stderr
out_decoded = (
sub_process.stdout.decode() if isinstance(sub_process.stdout, bytes) and not pipe else sub_process.stdout
)
err_decoded = (
sub_process.stderr.decode() if isinstance(sub_process.stderr, bytes) and not pipe else sub_process.stderr
)

error_msg = (
f"{log_prefix} Failed to run '{command}'. "
Expand Down