361
358
my_sock, subproc_sock = socket.socketpair()
363
359
except (AttributeError, socket.error):
364
360
# This platform doesn't support socketpair(), so just use ordinary
366
362
stdin = stdout = subprocess.PIPE
369
365
stdin = stdout = subproc_sock
370
367
proc = subprocess.Popen(argv, stdin=stdin, stdout=stdout,
371
368
**os_specific_subprocess_params())
376
371
def connect_sftp(self, username, password, host, port):