From 22ff22eb1b087f197008ceaf926d952b226f07bf Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 12 Nov 2023 19:11:20 +0300 Subject: [PATCH] Fix(Py3): Fix subrocess: pass bytes streams to `RecordFile` --- Robots/bkmk_rforking_sub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Robots/bkmk_rforking_sub.py b/Robots/bkmk_rforking_sub.py index 6823deb..3c68469 100755 --- a/Robots/bkmk_rforking_sub.py +++ b/Robots/bkmk_rforking_sub.py @@ -28,8 +28,8 @@ from subproc import RecordFile def run(): - bkmk_in = RecordFile(sys.stdin) - bkmk_out = RecordFile(sys.stdout) + bkmk_in = RecordFile(getattr(sys.stdin, 'buffer', None) or sys.stdin) + bkmk_out = RecordFile(getattr(sys.stdout, 'buffer', None) or sys.stdout) from m_lib.flog import openlog log = openlog("check2.log") -- 2.39.5