]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fix(Py3): Fix subrocess: pass bytes streams to `RecordFile`
authorOleg Broytman <phd@phdru.name>
Sun, 12 Nov 2023 16:11:20 +0000 (19:11 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 12 Nov 2023 19:21:09 +0000 (22:21 +0300)
Robots/bkmk_rforking_sub.py

index 6823debd8075925d1034941d9f0ea16c2ab5da85..3c6846921cfd72cd19edbf3ef7c434d8ce871f84 100755 (executable)
@@ -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")