Skip to content

Commit 444c8b4

Browse files
committed
Allow direct binary output to console
1 parent 6302464 commit 444c8b4

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
@@ -21,8 +21,8 @@
2121
__author__ = "Orsiris de Jong"
2222
__copyright__ = "Copyright (C) 2015-2025 Orsiris de Jong for NetInvent"
2323
__licence__ = "BSD 3 Clause"
24-
__version__ = "1.7.4"
25-
__build__ = "2025052301"
24+
__version__ = "1.7.5"
25+
__build__ = "2025090901"
2626
__compat__ = "python2.7+"
2727

2828
import io
@@ -839,7 +839,9 @@ def __check_timeout(
839839
if stdout_destination == "queue":
840840
stdout.put(line)
841841
if live_output:
842-
sys.stdout.write(line)
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)
843845
output_stdout += line
844846

845847
if stderr_read_queue:

0 commit comments

Comments
 (0)