Skip to content

Commit f2ea5bf

Browse files
committed
!fixup Allow direct binary output to console
1 parent fe38869 commit f2ea5bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

command_runner/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,9 +839,11 @@ def __check_timeout(
839839
if stdout_destination == "queue":
840840
stdout.put(line)
841841
if live_output:
842-
# We need to use sys.stdout.buffer instead of sys.stdout to allow binary output to console
843-
# without any translation that is done by sys.stdout.write()
844-
sys.stdout.buffer.write(line)
842+
if encoding == False:
843+
# We need to allow binary output too, hence using sys.stdout.buffer instead of sys.stdout
844+
sys.stdout.buffer.write(line)
845+
else:
846+
sys.stdout.write(line)
845847
output_stdout += line
846848

847849
if stderr_read_queue:

0 commit comments

Comments
 (0)