From b323c66f4e8ecedcae299e8442c91fcbaea9276f Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 15 Mar 2016 15:47:54 +0100 Subject: [PATCH] critical change one of the hacks I had done for python3 turns out to severely break dealing with binary files revert that change for now; it's probably safer to use py2 only with this version, and a deeper fix will be needed later on --- nepi/util/sshfuncs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nepi/util/sshfuncs.py b/nepi/util/sshfuncs.py index fa7df4b6..ca339b14 100644 --- a/nepi/util/sshfuncs.py +++ b/nepi/util/sshfuncs.py @@ -849,7 +849,8 @@ def _communicate(proc, input, timeout=None, err_on_timeout=True): # data = os.read(proc.stdout.fileno(), 1024) # but this would return bytes, so.. if proc.stdout in rlist: - data = proc.stdout.read() + #data = proc.stdout.read() + data = os.read(proc.stdout.fileno(), 1024) if not data: proc.stdout.close() read_set.remove(proc.stdout) @@ -858,7 +859,8 @@ def _communicate(proc, input, timeout=None, err_on_timeout=True): # likewise if proc.stderr in rlist: - data = proc.stderr.read() + #data = proc.stderr.read() + data = os.read(proc.stderr.fileno(), 1024) if not data: proc.stderr.close() read_set.remove(proc.stderr) -- 2.43.0