[PATCH 19 of 52 Narval cube] fix TemporaryFile() got an unexpected keyword argument 'bufsize'

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:19 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585458769 0
#      Sun Mar 29 05:12:49 2020 +0000
# Node ID 1c0ee82cd5709256b04a2aecb163907ad24b9f6a
# Parent  dbcb8b31aa1dba769c022985c7b580370d385c0a
fix TemporaryFile() got an unexpected keyword argument 'bufsize'

diff --git a/cubicweb_narval/narvalbot/server.py b/cubicweb_narval/narvalbot/server.py
--- a/cubicweb_narval/narvalbot/server.py
+++ b/cubicweb_narval/narvalbot/server.py
@@ -199,8 +199,8 @@
     def _spawn_task_process(self, task):
         """actually run the task by spawning a subprocess"""
         command = task.run_command(self.config)
-        outfile = TemporaryFile(mode='w+', bufsize=0)
-        errfile = TemporaryFile(mode='w+', bufsize=0)
+        outfile = TemporaryFile(mode='wb+', buffering=0)
+        errfile = TemporaryFile(mode='wb+', buffering=0)
         self.info(' '.join(command))
         try:
             cmd = Popen(command, bufsize=0, stdout=outfile, stderr=errfile)




More information about the cubicweb-devel mailing list