diff --git a/devlib/utils/ssh.py b/devlib/utils/ssh.py index c32a1ea..ea4e222 100644 --- a/devlib/utils/ssh.py +++ b/devlib/utils/ssh.py @@ -691,11 +691,11 @@ class SshConnection(SshConnectionBase): w = os.fdopen(w, 'wb') # Turn a file descriptor into a file-like object elif isinstance(stream_out, int) and stream_out >= 0: - r = os.fdopen(stream_out, 'rb') + r = os.fdopen(stream_in, 'rb') w = os.fdopen(stream_out, 'wb') # file-like object else: - r = stream_out + r = stream_in w = stream_out return (r, w)