diff --git a/k8s_gitlab_borg/__main__.py b/k8s_gitlab_borg/__main__.py index 88b8dd8..858f878 100644 --- a/k8s_gitlab_borg/__main__.py +++ b/k8s_gitlab_borg/__main__.py @@ -510,7 +510,7 @@ def main(): if event & select.POLLIN or event & select.POLLPRI: if rfd == proc.stdout.fileno(): logger.debug("Reading from stdout...") - if chunk := proc.stdout.read(PIPE_BUF): + if chunk := proc.stdout.buffer.read(PIPE_BUF): logger.debug("Done, length %d", len(chunk)) stdout_line_buffer.extend(chunk) while True: @@ -524,7 +524,7 @@ def main(): break if rfd == proc.stderr.fileno(): logger.debug("Reading from stderr...") - if chunk := proc.stderr.read(PIPE_BUF): + if chunk := proc.stderr.buffer.read(PIPE_BUF): logger.debug("Done, length %d", len(chunk)) stderr_line_buffer.extend(chunk) while True: