Преглед на файлове

Set bufsize=0 when communicating to SSH client. Fixes hangs on Python3. Fixes #434.

Jelmer Vernooij преди 8 години
родител
ревизия
c06fb97e43
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 3 0
      NEWS
  2. 1 1
      dulwich/client.py

+ 3 - 0
NEWS

@@ -28,6 +28,9 @@
  * Don't strip trailing newlines from extra headers.
    (Nicolas Dandrimont)
 
+ * Set bufsize=0 for subprocess interaction with SSH client.
+   Fixes hangs on Python 3. (René Stern, #434)
+
 0.16.3	2016-01-14
 
  TEST FIXES

+ 1 - 1
dulwich/client.py

@@ -949,7 +949,7 @@ class SubprocessSSHVendor(SSHVendor):
         if username is not None:
             host = '%s@%s' % (username, host)
         args.append(host)
-        proc = subprocess.Popen(args + [command],
+        proc = subprocess.Popen(args + [command], bufsize=0,
                                 stdin=subprocess.PIPE,
                                 stdout=subprocess.PIPE)
         return SubprocessWrapper(proc)