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