Skip to content

Commit 1deb910

Browse files
author
Pan
committed
Updated session agent connect to propagate connction exception
1 parent 912974c commit 1deb910

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ssh2/session.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ cimport c_ssh2
1919

2020
cdef class Session:
2121
cdef c_ssh2.LIBSSH2_SESSION *_session
22-
cdef c_ssh2.LIBSSH2_AGENT * init_connect_agent(self) nogil
22+
cdef c_ssh2.LIBSSH2_AGENT * init_connect_agent(self) nogil except NULL
2323
cdef c_ssh2.LIBSSH2_AGENT * _agent_init(self)
2424
cdef object socket

ssh2/session.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ cdef class Session:
169169
raise MemoryError
170170
return agent
171171

172-
cdef c_ssh2.LIBSSH2_AGENT * init_connect_agent(self) nogil:
172+
cdef c_ssh2.LIBSSH2_AGENT * init_connect_agent(self) nogil except NULL:
173173
agent = c_ssh2.libssh2_agent_init(self._session)
174174
if agent is NULL:
175175
with gil:

0 commit comments

Comments
 (0)