diff --git a/ci/travis/build-manylinux.sh b/ci/travis/build-manylinux.sh index 3b1e52de..61caacf3 100755 --- a/ci/travis/build-manylinux.sh +++ b/ci/travis/build-manylinux.sh @@ -6,6 +6,6 @@ rm -rf build dist docker pull $docker_tag || echo docker build --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -docker push $docker_tag +# docker push $docker_tag docker run --rm -v `pwd`:/io $docker_tag /io/ci/travis/build-wheels.sh ls wheelhouse/ diff --git a/ssh2/sftp.pyx b/ssh2/sftp.pyx index 6c488ee3..fc8102cc 100644 --- a/ssh2/sftp.pyx +++ b/ssh2/sftp.pyx @@ -232,12 +232,18 @@ cdef class SFTP: :raises: :py:class:`ssh2.exceptions.SFTPHandleError` on errors opening file. """ - cdef c_sftp.LIBSSH2_SFTP_HANDLE *_handle + cdef c_sftp.LIBSSH2_SFTP_HANDLE *_handle = NULL cdef bytes b_filename = to_bytes(filename) cdef char *_filename = b_filename + cdef int rc = c_ssh2.LIBSSH2_ERROR_EAGAIN + with nogil: - _handle = c_sftp.libssh2_sftp_open( - self._sftp, _filename, flags, mode) + while _handle == NULL and rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: + _handle = c_sftp.libssh2_sftp_open( + self._sftp, _filename, flags, mode) + + rc = c_ssh2.libssh2_session_last_errno(self._session._session) + if _handle is NULL: return self._handle_error(c_ssh2.libssh2_session_last_errno( self._session._session), filename)