377
377
return SFTPClient(SocketAsChannelAdapter(sock))
378
378
except _sftp_connection_errors, e:
379
379
self._raise_connection_error(host, port=port, orig_error=e)
380
except (OSError, IOError, socket.error), e:
381
381
# If the machine is fast enough, ssh can actually exit
382
382
# before we try and send it the sftp request, which