From: Oleg Broytman Date: Sun, 12 Nov 2023 16:11:20 +0000 (+0300) Subject: Fix(Py3): Fix subrocess: pass bytes streams to `RecordFile` X-Git-Tag: 5.0.0~44 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=22ff22eb1b087f197008ceaf926d952b226f07bf;p=bookmarks_db.git Fix(Py3): Fix subrocess: pass bytes streams to `RecordFile` --- 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")