diff --git a/.gitignore b/.gitignore index 1907f96..0e4eef7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ build *~ *.so* src +local libssh/compile_commands.json wheelhouse .idea diff --git a/Changelog.rst b/Changelog.rst index 4c109c2..dd1a875 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -8,6 +8,7 @@ Changes ------- * Updated embedded libssh to ``0.9.5``. +* ``Session.channel_new`` now raises ``ssh.exceptions.ChannelOpenFailure`` on failure to create new channel. 0.6.0 +++++ diff --git a/MANIFEST.in b/MANIFEST.in index 5254337..a7e50d7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,7 @@ include LICENSE include COPYING include ssh/*.pyx include ssh/*.pxd +include ssh/*.c recursive-include libssh * include ci/build_ssh.sh include _setup_libssh.py diff --git a/_setup_libssh.py b/_setup_libssh.py index 7114ead..e122414 100644 --- a/_setup_libssh.py +++ b/_setup_libssh.py @@ -22,7 +22,8 @@ def build_ssh(): os.mkdir('local/lib') # Depending on architecture cmake installs libraries into lib64, # but we don't care about that. - os.symlink('lib', 'local/lib64') + if not os.path.exists('local/lib64'): + os.symlink('lib', 'local/lib64') os.chdir('src') check_call('cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local -DWITH_GSS_API=ON ../libssh', diff --git a/ssh/session.c b/ssh/session.c index b7b506f..ef280a1 100644 --- a/ssh/session.c +++ b/ssh/session.c @@ -1599,10 +1599,12 @@ static const char __pyx_k_SSH_AUTH_SUCCESS[] = "SSH_AUTH_SUCCESS"; static const char __pyx_k_SSH_CLOSED_ERROR[] = "SSH_CLOSED_ERROR"; static const char __pyx_k_SSH_READ_PENDING[] = "SSH_READ_PENDING"; static const char __pyx_k_SSH_WRITE_PENDING[] = "SSH_WRITE_PENDING"; +static const char __pyx_k_ChannelOpenFailure[] = "ChannelOpenFailure"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_Session_is_not_connected[] = "Session is not connected"; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +static PyObject *__pyx_n_s_ChannelOpenFailure; static PyObject *__pyx_n_s_InvalidAPIUse; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_n_s_NotImplementedError; @@ -2378,8 +2380,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2414,7 +2415,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) # <<<<<<<<<<<<<< * if _channel is NULL: - * return handle_error_codes( + * raise ChannelOpenFailure */ __pyx_v__channel = ssh_channel_new(__pyx_v_self->_session); } @@ -2449,66 +2450,48 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: # <<<<<<<<<<<<<< - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) + * raise ChannelOpenFailure + * channel = Channel.from_ptr(_channel, self) */ __pyx_t_1 = ((__pyx_v__channel == NULL) != 0); - if (__pyx_t_1) { + if (unlikely(__pyx_t_1)) { /* "ssh/session.pyx":100 * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: - * return handle_error_codes( # <<<<<<<<<<<<<< - * c_ssh.ssh_get_error_code(self._session), self._session) - * channel = Channel.from_ptr(_channel, self) - */ - __Pyx_XDECREF(__pyx_r); - - /* "ssh/session.pyx":101 - * if _channel is NULL: - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< + * raise ChannelOpenFailure # <<<<<<<<<<<<<< * channel = Channel.from_ptr(_channel, self) * return channel */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 100, __pyx_L1_error) - - /* "ssh/session.pyx":100 - * _channel = c_ssh.ssh_channel_new(self._session) - * if _channel is NULL: - * return handle_error_codes( # <<<<<<<<<<<<<< - * c_ssh.ssh_get_error_code(self._session), self._session) - * channel = Channel.from_ptr(_channel, self) - */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ChannelOpenFailure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 100, __pyx_L1_error) /* "ssh/session.pyx":99 * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: # <<<<<<<<<<<<<< - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) + * raise ChannelOpenFailure + * channel = Channel.from_ptr(_channel, self) */ } - /* "ssh/session.pyx":102 - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) + /* "ssh/session.pyx":101 + * if _channel is NULL: + * raise ChannelOpenFailure * channel = Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< * return channel * */ - __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_channel = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_channel = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_2); + __pyx_t_2 = 0; - /* "ssh/session.pyx":103 - * c_ssh.ssh_get_error_code(self._session), self._session) + /* "ssh/session.pyx":102 + * raise ChannelOpenFailure * channel = Channel.from_ptr(_channel, self) * return channel # <<<<<<<<<<<<<< * @@ -2529,7 +2512,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("ssh.session.Session.channel_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -2539,7 +2522,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":105 +/* "ssh/session.pyx":104 * return channel * * def sftp_new(self): # <<<<<<<<<<<<<< @@ -2574,7 +2557,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sftp_new", 0); - /* "ssh/session.pyx":108 + /* "ssh/session.pyx":107 * cdef sftp_session _sftp * cdef SFTP sftp * with nogil: # <<<<<<<<<<<<<< @@ -2589,16 +2572,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":109 + /* "ssh/session.pyx":108 * cdef SFTP sftp * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _sftp = sftp_new(self._session) * if _sftp is NULL: */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 109, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 108, __pyx_L4_error) - /* "ssh/session.pyx":110 + /* "ssh/session.pyx":109 * with nogil: * _check_connected(self._session) * _sftp = sftp_new(self._session) # <<<<<<<<<<<<<< @@ -2608,7 +2591,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss __pyx_v__sftp = sftp_new(__pyx_v_self->_session); } - /* "ssh/session.pyx":108 + /* "ssh/session.pyx":107 * cdef sftp_session _sftp * cdef SFTP sftp * with nogil: # <<<<<<<<<<<<<< @@ -2634,7 +2617,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":111 + /* "ssh/session.pyx":110 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2644,7 +2627,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss __pyx_t_1 = ((__pyx_v__sftp == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":112 + /* "ssh/session.pyx":111 * _sftp = sftp_new(self._session) * if _sftp is NULL: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2653,29 +2636,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":113 + /* "ssh/session.pyx":112 * if _sftp is NULL: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * sftp = SFTP.from_ptr(_sftp, self) * return sftp */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error) - /* "ssh/session.pyx":112 + /* "ssh/session.pyx":111 * _sftp = sftp_new(self._session) * if _sftp is NULL: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":111 + /* "ssh/session.pyx":110 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2684,19 +2667,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":114 + /* "ssh/session.pyx":113 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) # <<<<<<<<<<<<<< * return sftp * */ - __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_sftp = ((struct __pyx_obj_3ssh_4sftp_SFTP *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":115 + /* "ssh/session.pyx":114 * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) * return sftp # <<<<<<<<<<<<<< @@ -2708,7 +2691,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss __pyx_r = ((PyObject *)__pyx_v_sftp); goto __pyx_L0; - /* "ssh/session.pyx":105 + /* "ssh/session.pyx":104 * return channel * * def sftp_new(self): # <<<<<<<<<<<<<< @@ -2728,7 +2711,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/session.pyx":117 +/* "ssh/session.pyx":116 * return sftp * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -2764,7 +2747,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sftp_init", 0); - /* "ssh/session.pyx":125 + /* "ssh/session.pyx":124 * cdef SFTP sftp * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2779,16 +2762,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":126 + /* "ssh/session.pyx":125 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _sftp = sftp_new(self._session) * if _sftp is NULL: */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 126, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 125, __pyx_L4_error) - /* "ssh/session.pyx":127 + /* "ssh/session.pyx":126 * with nogil: * _check_connected(self._session) * _sftp = sftp_new(self._session) # <<<<<<<<<<<<<< @@ -2797,7 +2780,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ __pyx_v__sftp = sftp_new(__pyx_v_self->_session); - /* "ssh/session.pyx":128 + /* "ssh/session.pyx":127 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2807,7 +2790,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s __pyx_t_1 = ((__pyx_v__sftp == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":129 + /* "ssh/session.pyx":128 * _sftp = sftp_new(self._session) * if _sftp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2820,7 +2803,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":130 + /* "ssh/session.pyx":129 * if _sftp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2829,30 +2812,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":131 + /* "ssh/session.pyx":130 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * rc = sftp_init(_sftp) * sftp = SFTP.from_ptr(_sftp, self) */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 130, __pyx_L8_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 129, __pyx_L8_error) - /* "ssh/session.pyx":130 + /* "ssh/session.pyx":129 * if _sftp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":129 + /* "ssh/session.pyx":128 * _sftp = sftp_new(self._session) * if _sftp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2875,7 +2858,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s } } - /* "ssh/session.pyx":128 + /* "ssh/session.pyx":127 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2884,7 +2867,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ } - /* "ssh/session.pyx":132 + /* "ssh/session.pyx":131 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) # <<<<<<<<<<<<<< @@ -2894,7 +2877,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s __pyx_v_rc = sftp_init(__pyx_v__sftp); } - /* "ssh/session.pyx":125 + /* "ssh/session.pyx":124 * cdef SFTP sftp * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2927,28 +2910,28 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s } } - /* "ssh/session.pyx":133 + /* "ssh/session.pyx":132 * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) * sftp = SFTP.from_ptr(_sftp, self) # <<<<<<<<<<<<<< * handle_error_codes(rc, self._session) * return sftp */ - __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_sftp = ((struct __pyx_obj_3ssh_4sftp_SFTP *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":134 + /* "ssh/session.pyx":133 * rc = sftp_init(_sftp) * sftp = SFTP.from_ptr(_sftp, self) * handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< * return sftp * */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 133, __pyx_L1_error) - /* "ssh/session.pyx":135 + /* "ssh/session.pyx":134 * sftp = SFTP.from_ptr(_sftp, self) * handle_error_codes(rc, self._session) * return sftp # <<<<<<<<<<<<<< @@ -2960,7 +2943,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s __pyx_r = ((PyObject *)__pyx_v_sftp); goto __pyx_L0; - /* "ssh/session.pyx":117 + /* "ssh/session.pyx":116 * return sftp * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -2980,7 +2963,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s return __pyx_r; } -/* "ssh/session.pyx":137 +/* "ssh/session.pyx":136 * return sftp * * def connect(self): # <<<<<<<<<<<<<< @@ -3013,7 +2996,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 0); - /* "ssh/session.pyx":139 + /* "ssh/session.pyx":138 * def connect(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3028,7 +3011,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh #endif /*try:*/ { - /* "ssh/session.pyx":140 + /* "ssh/session.pyx":139 * cdef int rc * with nogil: * rc = c_ssh.ssh_connect(self._session) # <<<<<<<<<<<<<< @@ -3038,7 +3021,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh __pyx_v_rc = ssh_connect(__pyx_v_self->_session); } - /* "ssh/session.pyx":139 + /* "ssh/session.pyx":138 * def connect(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3057,7 +3040,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh } } - /* "ssh/session.pyx":141 + /* "ssh/session.pyx":140 * with nogil: * rc = c_ssh.ssh_connect(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3065,14 +3048,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh * def disconnect(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 141, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":137 + /* "ssh/session.pyx":136 * return sftp * * def connect(self): # <<<<<<<<<<<<<< @@ -3091,7 +3074,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh return __pyx_r; } -/* "ssh/session.pyx":143 +/* "ssh/session.pyx":142 * return handle_error_codes(rc, self._session) * * def disconnect(self): # <<<<<<<<<<<<<< @@ -3125,7 +3108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED stru return __pyx_r; } -/* "ssh/session.pyx":154 +/* "ssh/session.pyx":153 * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< @@ -3158,7 +3141,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connector_new", 0); - /* "ssh/session.pyx":156 + /* "ssh/session.pyx":155 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3173,7 +3156,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":157 + /* "ssh/session.pyx":156 * cdef c_ssh.ssh_connector _connector * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) # <<<<<<<<<<<<<< @@ -3183,7 +3166,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob __pyx_v__connector = ssh_connector_new(__pyx_v_self->_session); } - /* "ssh/session.pyx":156 + /* "ssh/session.pyx":155 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3202,7 +3185,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob } } - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":157 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3212,7 +3195,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob __pyx_t_1 = ((__pyx_v__connector == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":159 + /* "ssh/session.pyx":158 * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: * return # <<<<<<<<<<<<<< @@ -3223,7 +3206,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":157 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3232,7 +3215,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob */ } - /* "ssh/session.pyx":160 + /* "ssh/session.pyx":159 * if _connector is NULL: * return * return Connector.from_ptr(_connector, self) # <<<<<<<<<<<<<< @@ -3240,13 +3223,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob * def accept_forward(self, int timeout, int dest_port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_9connector_Connector->from_ptr(__pyx_v__connector, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_9connector_Connector->from_ptr(__pyx_v__connector, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":154 + /* "ssh/session.pyx":153 * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< @@ -3265,7 +3248,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":162 +/* "ssh/session.pyx":161 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3308,11 +3291,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_21accept_forward(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, 1); __PYX_ERR(0, 162, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, 1); __PYX_ERR(0, 161, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "accept_forward") < 0)) __PYX_ERR(0, 162, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "accept_forward") < 0)) __PYX_ERR(0, 161, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3320,12 +3303,12 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_21accept_forward(PyObject *__py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L3_error) - __pyx_v_dest_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error) + __pyx_v_dest_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 162, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 161, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.accept_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3349,7 +3332,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("accept_forward", 0); - /* "ssh/session.pyx":164 + /* "ssh/session.pyx":163 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3364,16 +3347,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":165 + /* "ssh/session.pyx":164 * cdef c_ssh.ssh_channel _channel * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 165, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 164, __pyx_L4_error) - /* "ssh/session.pyx":166 + /* "ssh/session.pyx":165 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_accept_forward( # <<<<<<<<<<<<<< @@ -3383,7 +3366,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o __pyx_v__channel = ssh_channel_accept_forward(__pyx_v_self->_session, __pyx_v_timeout, (&__pyx_v_dest_port)); } - /* "ssh/session.pyx":164 + /* "ssh/session.pyx":163 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3409,7 +3392,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o } } - /* "ssh/session.pyx":168 + /* "ssh/session.pyx":167 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3419,7 +3402,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o __pyx_t_1 = ((__pyx_v__channel == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":169 + /* "ssh/session.pyx":168 * self._session, timeout, &dest_port) * if _channel is NULL: * return # <<<<<<<<<<<<<< @@ -3430,7 +3413,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":168 + /* "ssh/session.pyx":167 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3439,7 +3422,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o */ } - /* "ssh/session.pyx":170 + /* "ssh/session.pyx":169 * if _channel is NULL: * return * return Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< @@ -3447,13 +3430,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o * def cancel_forward(self, address not None, int port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":162 + /* "ssh/session.pyx":161 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3472,7 +3455,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":172 +/* "ssh/session.pyx":171 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3515,11 +3498,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_23cancel_forward(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, 1); __PYX_ERR(0, 172, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, 1); __PYX_ERR(0, 171, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_forward") < 0)) __PYX_ERR(0, 172, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_forward") < 0)) __PYX_ERR(0, 171, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3528,18 +3511,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_23cancel_forward(PyObject *__py values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_address = values[0]; - __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L3_error) + __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 172, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 171, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.cancel_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_address) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 172, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 171, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_22cancel_forward(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_address, __pyx_v_port); @@ -3566,19 +3549,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancel_forward", 0); - /* "ssh/session.pyx":173 + /* "ssh/session.pyx":172 * * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) # <<<<<<<<<<<<<< * cdef char *c_address = b_address * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":174 + /* "ssh/session.pyx":173 * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3587,12 +3570,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o */ if (unlikely(__pyx_v_b_address == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 173, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L1_error) __pyx_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":176 + /* "ssh/session.pyx":175 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3607,7 +3590,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":177 + /* "ssh/session.pyx":176 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_cancel_forward( # <<<<<<<<<<<<<< @@ -3617,7 +3600,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o __pyx_v_rc = ssh_channel_cancel_forward(__pyx_v_self->_session, __pyx_v_c_address, __pyx_v_port); } - /* "ssh/session.pyx":176 + /* "ssh/session.pyx":175 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3636,7 +3619,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o } } - /* "ssh/session.pyx":179 + /* "ssh/session.pyx":178 * rc = c_ssh.ssh_channel_cancel_forward( * self._session, c_address, port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3644,14 +3627,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o * def listen_forward(self, address not None, int port, int bound_port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 179, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":172 + /* "ssh/session.pyx":171 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3671,7 +3654,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":181 +/* "ssh/session.pyx":180 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3717,17 +3700,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_25listen_forward(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 1); __PYX_ERR(0, 181, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 1); __PYX_ERR(0, 180, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bound_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 2); __PYX_ERR(0, 181, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 2); __PYX_ERR(0, 180, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "listen_forward") < 0)) __PYX_ERR(0, 181, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "listen_forward") < 0)) __PYX_ERR(0, 180, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3737,19 +3720,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_25listen_forward(PyObject *__py values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_address = values[0]; - __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) - __pyx_v_bound_port = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_bound_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) + __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + __pyx_v_bound_port = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_bound_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 181, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 180, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.listen_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_address) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 181, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 180, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_24listen_forward(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_address, __pyx_v_port, __pyx_v_bound_port); @@ -3776,19 +3759,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("listen_forward", 0); - /* "ssh/session.pyx":182 + /* "ssh/session.pyx":181 * * def listen_forward(self, address not None, int port, int bound_port): * cdef bytes b_address = to_bytes(address) # <<<<<<<<<<<<<< * cdef char *c_address = b_address * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":183 + /* "ssh/session.pyx":182 * def listen_forward(self, address not None, int port, int bound_port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3797,12 +3780,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o */ if (unlikely(__pyx_v_b_address == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 183, __pyx_L1_error) + __PYX_ERR(0, 182, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L1_error) __pyx_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":185 + /* "ssh/session.pyx":184 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3817,7 +3800,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":186 + /* "ssh/session.pyx":185 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_listen_forward( # <<<<<<<<<<<<<< @@ -3827,7 +3810,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o __pyx_v_rc = ssh_channel_listen_forward(__pyx_v_self->_session, __pyx_v_c_address, __pyx_v_port, (&__pyx_v_bound_port)); } - /* "ssh/session.pyx":185 + /* "ssh/session.pyx":184 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3846,7 +3829,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o } } - /* "ssh/session.pyx":188 + /* "ssh/session.pyx":187 * rc = c_ssh.ssh_channel_listen_forward( * self._session, c_address, port, &bound_port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3854,14 +3837,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o * def get_disconnect_message(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 188, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":181 + /* "ssh/session.pyx":180 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3881,7 +3864,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":190 +/* "ssh/session.pyx":189 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -3915,7 +3898,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_disconnect_message", 0); - /* "ssh/session.pyx":193 + /* "ssh/session.pyx":192 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -3930,16 +3913,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct #endif /*try:*/ { - /* "ssh/session.pyx":194 + /* "ssh/session.pyx":193 * cdef bytes b_message * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 194, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 193, __pyx_L4_error) - /* "ssh/session.pyx":195 + /* "ssh/session.pyx":194 * with nogil: * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) # <<<<<<<<<<<<<< @@ -3949,7 +3932,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct __pyx_v_message = ssh_get_disconnect_message(__pyx_v_self->_session); } - /* "ssh/session.pyx":193 + /* "ssh/session.pyx":192 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -3975,19 +3958,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct } } - /* "ssh/session.pyx":196 + /* "ssh/session.pyx":195 * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message # <<<<<<<<<<<<<< * return b_message * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_message = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":197 + /* "ssh/session.pyx":196 * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message * return b_message # <<<<<<<<<<<<<< @@ -3999,7 +3982,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct __pyx_r = __pyx_v_b_message; goto __pyx_L0; - /* "ssh/session.pyx":190 + /* "ssh/session.pyx":189 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -4019,7 +4002,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct return __pyx_r; } -/* "ssh/session.pyx":199 +/* "ssh/session.pyx":198 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4051,7 +4034,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_fd", 0); - /* "ssh/session.pyx":201 + /* "ssh/session.pyx":200 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4066,7 +4049,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/session.pyx":202 + /* "ssh/session.pyx":201 * cdef c_ssh.socket_t _sock * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) # <<<<<<<<<<<<<< @@ -4076,7 +4059,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ __pyx_v__sock = ssh_get_fd(__pyx_v_self->_session); } - /* "ssh/session.pyx":201 + /* "ssh/session.pyx":200 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4095,7 +4078,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ } } - /* "ssh/session.pyx":203 + /* "ssh/session.pyx":202 * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) * return _sock # <<<<<<<<<<<<<< @@ -4103,13 +4086,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ * def get_issue_banner(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_socket_t(__pyx_v__sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_socket_t(__pyx_v__sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":199 + /* "ssh/session.pyx":198 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4128,7 +4111,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/session.pyx":205 +/* "ssh/session.pyx":204 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4162,7 +4145,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_issue_banner", 0); - /* "ssh/session.pyx":208 + /* "ssh/session.pyx":207 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4177,16 +4160,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":209 + /* "ssh/session.pyx":208 * cdef bytes banner * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 209, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 208, __pyx_L4_error) - /* "ssh/session.pyx":210 + /* "ssh/session.pyx":209 * with nogil: * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) # <<<<<<<<<<<<<< @@ -4196,7 +4179,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx __pyx_v__banner = ssh_get_issue_banner(__pyx_v_self->_session); } - /* "ssh/session.pyx":208 + /* "ssh/session.pyx":207 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4222,19 +4205,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx } } - /* "ssh/session.pyx":211 + /* "ssh/session.pyx":210 * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner # <<<<<<<<<<<<<< * return banner * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":212 + /* "ssh/session.pyx":211 * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -4246,7 +4229,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":205 + /* "ssh/session.pyx":204 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4266,7 +4249,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":214 +/* "ssh/session.pyx":213 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4299,7 +4282,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_openssh_version", 0); - /* "ssh/session.pyx":216 + /* "ssh/session.pyx":215 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4314,16 +4297,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ #endif /*try:*/ { - /* "ssh/session.pyx":217 + /* "ssh/session.pyx":216 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 217, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 216, __pyx_L4_error) - /* "ssh/session.pyx":218 + /* "ssh/session.pyx":217 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) # <<<<<<<<<<<<<< @@ -4333,7 +4316,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ __pyx_v_rc = ssh_get_openssh_version(__pyx_v_self->_session); } - /* "ssh/session.pyx":216 + /* "ssh/session.pyx":215 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4359,7 +4342,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ } } - /* "ssh/session.pyx":219 + /* "ssh/session.pyx":218 * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4367,13 +4350,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ * def get_server_publickey(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":214 + /* "ssh/session.pyx":213 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4392,7 +4375,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ return __pyx_r; } -/* "ssh/session.pyx":221 +/* "ssh/session.pyx":220 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4422,7 +4405,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_server_publickey", 0); - /* "ssh/session.pyx":222 + /* "ssh/session.pyx":221 * * def get_server_publickey(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -4430,9 +4413,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U * def get_version(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 222, __pyx_L1_error) + __PYX_ERR(0, 221, __pyx_L1_error) - /* "ssh/session.pyx":221 + /* "ssh/session.pyx":220 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4449,7 +4432,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U return __pyx_r; } -/* "ssh/session.pyx":224 +/* "ssh/session.pyx":223 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4481,7 +4464,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_version", 0); - /* "ssh/session.pyx":226 + /* "ssh/session.pyx":225 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4496,7 +4479,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":227 + /* "ssh/session.pyx":226 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_version(self._session) # <<<<<<<<<<<<<< @@ -4506,7 +4489,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ __pyx_v_rc = ssh_get_version(__pyx_v_self->_session); } - /* "ssh/session.pyx":226 + /* "ssh/session.pyx":225 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4525,7 +4508,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ } } - /* "ssh/session.pyx":228 + /* "ssh/session.pyx":227 * with nogil: * rc = c_ssh.ssh_get_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4533,13 +4516,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ * def get_status(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":224 + /* "ssh/session.pyx":223 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4558,7 +4541,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":230 +/* "ssh/session.pyx":229 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4590,7 +4573,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_status", 0); - /* "ssh/session.pyx":232 + /* "ssh/session.pyx":231 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4605,7 +4588,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":233 + /* "ssh/session.pyx":232 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_status(self._session) # <<<<<<<<<<<<<< @@ -4615,7 +4598,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 __pyx_v_rc = ssh_get_status(__pyx_v_self->_session); } - /* "ssh/session.pyx":232 + /* "ssh/session.pyx":231 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4634,7 +4617,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 } } - /* "ssh/session.pyx":234 + /* "ssh/session.pyx":233 * with nogil: * rc = c_ssh.ssh_get_status(self._session) * return rc # <<<<<<<<<<<<<< @@ -4642,13 +4625,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 * def get_poll_flags(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":230 + /* "ssh/session.pyx":229 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4667,7 +4650,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":236 +/* "ssh/session.pyx":235 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4699,7 +4682,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_poll_flags", 0); - /* "ssh/session.pyx":238 + /* "ssh/session.pyx":237 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4714,7 +4697,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":239 + /* "ssh/session.pyx":238 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) # <<<<<<<<<<<<<< @@ -4724,7 +4707,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o __pyx_v_rc = ssh_get_poll_flags(__pyx_v_self->_session); } - /* "ssh/session.pyx":238 + /* "ssh/session.pyx":237 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4743,7 +4726,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o } } - /* "ssh/session.pyx":240 + /* "ssh/session.pyx":239 * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) * return rc # <<<<<<<<<<<<<< @@ -4751,13 +4734,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o * def is_blocking(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":236 + /* "ssh/session.pyx":235 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4776,7 +4759,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":242 +/* "ssh/session.pyx":241 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4809,7 +4792,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_blocking", 0); - /* "ssh/session.pyx":244 + /* "ssh/session.pyx":243 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4824,7 +4807,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":245 + /* "ssh/session.pyx":244 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) # <<<<<<<<<<<<<< @@ -4834,7 +4817,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ __pyx_v_rc = ssh_is_blocking(__pyx_v_self->_session); } - /* "ssh/session.pyx":244 + /* "ssh/session.pyx":243 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4853,7 +4836,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ } } - /* "ssh/session.pyx":246 + /* "ssh/session.pyx":245 * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4862,13 +4845,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_rc; - __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":242 + /* "ssh/session.pyx":241 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4887,7 +4870,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":248 +/* "ssh/session.pyx":247 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -4920,7 +4903,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_connected", 0); - /* "ssh/session.pyx":250 + /* "ssh/session.pyx":249 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4935,7 +4918,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":251 + /* "ssh/session.pyx":250 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_connected(self._session) # <<<<<<<<<<<<<< @@ -4945,7 +4928,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj __pyx_v_rc = ssh_is_connected(__pyx_v_self->_session); } - /* "ssh/session.pyx":250 + /* "ssh/session.pyx":249 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4964,7 +4947,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj } } - /* "ssh/session.pyx":252 + /* "ssh/session.pyx":251 * with nogil: * rc = c_ssh.ssh_is_connected(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4973,13 +4956,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_rc; - __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":248 + /* "ssh/session.pyx":247 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -4998,7 +4981,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":254 +/* "ssh/session.pyx":253 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5031,7 +5014,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_server_known", 0); - /* "ssh/session.pyx":256 + /* "ssh/session.pyx":255 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5046,7 +5029,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":257 + /* "ssh/session.pyx":256 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) # <<<<<<<<<<<<<< @@ -5056,7 +5039,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ __pyx_v_rc = ssh_is_server_known(__pyx_v_self->_session); } - /* "ssh/session.pyx":256 + /* "ssh/session.pyx":255 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5075,7 +5058,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ } } - /* "ssh/session.pyx":258 + /* "ssh/session.pyx":257 * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5084,13 +5067,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_rc; - __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":254 + /* "ssh/session.pyx":253 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5109,7 +5092,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":260 +/* "ssh/session.pyx":259 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5127,7 +5110,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_49copy_options(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy_options (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_destination), __pyx_ptype_3ssh_7session_Session, 1, "destination", 0))) __PYX_ERR(0, 260, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_destination), __pyx_ptype_3ssh_7session_Session, 1, "destination", 0))) __PYX_ERR(0, 259, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_48copy_options(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_destination)); /* function exit code */ @@ -5150,7 +5133,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy_options", 0); - /* "ssh/session.pyx":262 + /* "ssh/session.pyx":261 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5165,7 +5148,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":263 + /* "ssh/session.pyx":262 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) # <<<<<<<<<<<<<< @@ -5175,7 +5158,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj __pyx_v_rc = ssh_options_copy(__pyx_v_self->_session, (&__pyx_v_destination->_session)); } - /* "ssh/session.pyx":262 + /* "ssh/session.pyx":261 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5194,7 +5177,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj } } - /* "ssh/session.pyx":264 + /* "ssh/session.pyx":263 * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5202,14 +5185,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj * def options_getopt(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 264, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 263, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":260 + /* "ssh/session.pyx":259 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5228,7 +5211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":266 +/* "ssh/session.pyx":265 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5258,7 +5241,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_getopt", 0); - /* "ssh/session.pyx":267 + /* "ssh/session.pyx":266 * * def options_getopt(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -5266,9 +5249,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED * def options_parse_config(self, filepath): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 267, __pyx_L1_error) + __PYX_ERR(0, 266, __pyx_L1_error) - /* "ssh/session.pyx":266 + /* "ssh/session.pyx":265 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5285,7 +5268,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED return __pyx_r; } -/* "ssh/session.pyx":269 +/* "ssh/session.pyx":268 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5321,19 +5304,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_parse_config", 0); - /* "ssh/session.pyx":270 + /* "ssh/session.pyx":269 * * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) # <<<<<<<<<<<<<< * cdef char *c_filepath = b_filepath * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_filepath = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":271 + /* "ssh/session.pyx":270 * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) * cdef char *c_filepath = b_filepath # <<<<<<<<<<<<<< @@ -5342,12 +5325,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ */ if (unlikely(__pyx_v_b_filepath == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 271, __pyx_L1_error) + __PYX_ERR(0, 270, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_filepath); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_filepath); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L1_error) __pyx_v_c_filepath = __pyx_t_2; - /* "ssh/session.pyx":273 + /* "ssh/session.pyx":272 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5362,7 +5345,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ #endif /*try:*/ { - /* "ssh/session.pyx":274 + /* "ssh/session.pyx":273 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) # <<<<<<<<<<<<<< @@ -5372,7 +5355,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ __pyx_v_rc = ssh_options_parse_config(__pyx_v_self->_session, __pyx_v_c_filepath); } - /* "ssh/session.pyx":273 + /* "ssh/session.pyx":272 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5391,7 +5374,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ } } - /* "ssh/session.pyx":275 + /* "ssh/session.pyx":274 * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5399,14 +5382,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ * def options_set_port(self, int port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":269 + /* "ssh/session.pyx":268 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5426,7 +5409,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ return __pyx_r; } -/* "ssh/session.pyx":277 +/* "ssh/session.pyx":276 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5446,7 +5429,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_55options_set_port(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_set_port (wrapper)", 0); assert(__pyx_arg_port); { - __pyx_v_port = __Pyx_PyInt_As_int(__pyx_arg_port); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) + __pyx_v_port = __Pyx_PyInt_As_int(__pyx_arg_port); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5472,7 +5455,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set_port", 0); - /* "ssh/session.pyx":279 + /* "ssh/session.pyx":278 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5487,7 +5470,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":280 + /* "ssh/session.pyx":279 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_set( # <<<<<<<<<<<<<< @@ -5497,7 +5480,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, SSH_OPTIONS_PORT, (&__pyx_v_port)); } - /* "ssh/session.pyx":279 + /* "ssh/session.pyx":278 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5516,7 +5499,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx } } - /* "ssh/session.pyx":282 + /* "ssh/session.pyx":281 * rc = c_ssh.ssh_options_set( * self._session, c_ssh.ssh_options_e.SSH_OPTIONS_PORT, &port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5524,14 +5507,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx * def options_set_gssapi_delegate_credentials(self, bint delegate): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 282, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":277 + /* "ssh/session.pyx":276 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5550,7 +5533,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":284 +/* "ssh/session.pyx":283 * return handle_error_codes(rc, self._session) * * def options_set_gssapi_delegate_credentials(self, bint delegate): # <<<<<<<<<<<<<< @@ -5570,7 +5553,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_set_gssapi_delegate_c __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_set_gssapi_delegate_credentials (wrapper)", 0); assert(__pyx_arg_delegate); { - __pyx_v_delegate = __Pyx_PyObject_IsTrue(__pyx_arg_delegate); if (unlikely((__pyx_v_delegate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L3_error) + __pyx_v_delegate = __Pyx_PyObject_IsTrue(__pyx_arg_delegate); if (unlikely((__pyx_v_delegate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5596,7 +5579,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set_gssapi_delegate_c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set_gssapi_delegate_credentials", 0); - /* "ssh/session.pyx":291 + /* "ssh/session.pyx":290 * :type delegate: bool * """ * with nogil: # <<<<<<<<<<<<<< @@ -5611,7 +5594,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set_gssapi_delegate_c #endif /*try:*/ { - /* "ssh/session.pyx":292 + /* "ssh/session.pyx":291 * """ * with nogil: * rc = c_ssh.ssh_options_set( # <<<<<<<<<<<<<< @@ -5621,7 +5604,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set_gssapi_delegate_c __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS, (&__pyx_v_delegate)); } - /* "ssh/session.pyx":291 + /* "ssh/session.pyx":290 * :type delegate: bool * """ * with nogil: # <<<<<<<<<<<<<< @@ -5640,7 +5623,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set_gssapi_delegate_c } } - /* "ssh/session.pyx":296 + /* "ssh/session.pyx":295 * c_ssh.ssh_options_e.SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS, * &delegate) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5648,14 +5631,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set_gssapi_delegate_c * def options_set(self, Option option, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 296, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":284 + /* "ssh/session.pyx":283 * return handle_error_codes(rc, self._session) * * def options_set_gssapi_delegate_credentials(self, bint delegate): # <<<<<<<<<<<<<< @@ -5674,7 +5657,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set_gssapi_delegate_c return __pyx_r; } -/* "ssh/session.pyx":298 +/* "ssh/session.pyx":297 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5717,11 +5700,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_59options_set(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 298, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 297, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 298, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 297, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5734,13 +5717,13 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_59options_set(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 298, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 297, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.options_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 297, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_58options_set(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_option, __pyx_v_value); /* function exit code */ @@ -5766,19 +5749,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set", 0); - /* "ssh/session.pyx":307 + /* "ssh/session.pyx":306 * :type option: :py:class:`ssh.options.Option` * """ * cdef bytes b_value = to_bytes(value) # <<<<<<<<<<<<<< * cdef char *c_value * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":310 + /* "ssh/session.pyx":309 * cdef char *c_value * cdef int rc * c_value = b_value # <<<<<<<<<<<<<< @@ -5787,12 +5770,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 310, __pyx_L1_error) + __PYX_ERR(0, 309, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/session.pyx":311 + /* "ssh/session.pyx":310 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5807,7 +5790,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":312 + /* "ssh/session.pyx":311 * c_value = b_value * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) # <<<<<<<<<<<<<< @@ -5817,7 +5800,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_c_value); } - /* "ssh/session.pyx":311 + /* "ssh/session.pyx":310 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5836,7 +5819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ } } - /* "ssh/session.pyx":313 + /* "ssh/session.pyx":312 * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5844,14 +5827,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ * def options_get(self, Option option): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 313, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":298 + /* "ssh/session.pyx":297 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5871,7 +5854,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_set(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":315 +/* "ssh/session.pyx":314 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5889,7 +5872,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_61options_get(PyObject *__pyx_v PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_get (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 315, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 314, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_60options_get(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7options_Option *)__pyx_v_option)); /* function exit code */ @@ -5916,7 +5899,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get", 0); - /* "ssh/session.pyx":320 + /* "ssh/session.pyx":319 * """ * cdef char *_value * cdef char **value = NULL # <<<<<<<<<<<<<< @@ -5925,7 +5908,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ */ __pyx_v_value = NULL; - /* "ssh/session.pyx":323 + /* "ssh/session.pyx":322 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5940,7 +5923,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":324 + /* "ssh/session.pyx":323 * cdef bytes b_value * with nogil: * rc = c_ssh.ssh_options_get( # <<<<<<<<<<<<<< @@ -5950,7 +5933,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ __pyx_v_rc = ssh_options_get(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_value); } - /* "ssh/session.pyx":323 + /* "ssh/session.pyx":322 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5969,7 +5952,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ } } - /* "ssh/session.pyx":326 + /* "ssh/session.pyx":325 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5979,20 +5962,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_rc < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/session.pyx":327 + /* "ssh/session.pyx":326 * self._session, option._option, value) * if rc < 0: * raise OptionError # <<<<<<<<<<<<<< * _value = value[0] * b_value = _value */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 327, __pyx_L1_error) + __PYX_ERR(0, 326, __pyx_L1_error) - /* "ssh/session.pyx":326 + /* "ssh/session.pyx":325 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -6001,7 +5984,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ */ } - /* "ssh/session.pyx":328 + /* "ssh/session.pyx":327 * if rc < 0: * raise OptionError * _value = value[0] # <<<<<<<<<<<<<< @@ -6010,19 +5993,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ */ __pyx_v__value = (__pyx_v_value[0]); - /* "ssh/session.pyx":329 + /* "ssh/session.pyx":328 * raise OptionError * _value = value[0] * b_value = _value # <<<<<<<<<<<<<< * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_value = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":330 + /* "ssh/session.pyx":329 * _value = value[0] * b_value = _value * c_ssh.ssh_string_free_char(_value) # <<<<<<<<<<<<<< @@ -6031,7 +6014,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ */ ssh_string_free_char(__pyx_v__value); - /* "ssh/session.pyx":331 + /* "ssh/session.pyx":330 * b_value = _value * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) # <<<<<<<<<<<<<< @@ -6039,14 +6022,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ * def options_get_port(self, unsigned int port_target): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":315 + /* "ssh/session.pyx":314 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -6066,7 +6049,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":333 +/* "ssh/session.pyx":332 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6086,7 +6069,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_63options_get_port(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_get_port (wrapper)", 0); assert(__pyx_arg_port_target); { - __pyx_v_port_target = __Pyx_PyInt_As_unsigned_int(__pyx_arg_port_target); if (unlikely((__pyx_v_port_target == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L3_error) + __pyx_v_port_target = __Pyx_PyInt_As_unsigned_int(__pyx_arg_port_target); if (unlikely((__pyx_v_port_target == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6112,7 +6095,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62options_get_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get_port", 0); - /* "ssh/session.pyx":335 + /* "ssh/session.pyx":334 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6127,7 +6110,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62options_get_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":336 + /* "ssh/session.pyx":335 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) # <<<<<<<<<<<<<< @@ -6137,7 +6120,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62options_get_port(struct __pyx __pyx_v_rc = ssh_options_get_port(__pyx_v_self->_session, (&__pyx_v_port_target)); } - /* "ssh/session.pyx":335 + /* "ssh/session.pyx":334 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6156,7 +6139,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62options_get_port(struct __pyx } } - /* "ssh/session.pyx":337 + /* "ssh/session.pyx":336 * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6164,14 +6147,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62options_get_port(struct __pyx * def send_ignore(self, bytes data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 337, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 336, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":333 + /* "ssh/session.pyx":332 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6190,7 +6173,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62options_get_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":339 +/* "ssh/session.pyx":338 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6208,7 +6191,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_ignore(PyObject *__pyx_v PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_ignore (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 339, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 338, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_64send_ignore(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6233,7 +6216,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_ignore", 0); - /* "ssh/session.pyx":340 + /* "ssh/session.pyx":339 * * def send_ignore(self, bytes data): * cdef char *c_data = data # <<<<<<<<<<<<<< @@ -6242,12 +6225,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 340, __pyx_L1_error) + __PYX_ERR(0, 339, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) __pyx_v_c_data = __pyx_t_1; - /* "ssh/session.pyx":342 + /* "ssh/session.pyx":341 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6262,7 +6245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":343 + /* "ssh/session.pyx":342 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) # <<<<<<<<<<<<<< @@ -6272,7 +6255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ __pyx_v_rc = ssh_send_ignore(__pyx_v_self->_session, __pyx_v_c_data); } - /* "ssh/session.pyx":342 + /* "ssh/session.pyx":341 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6291,7 +6274,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ } } - /* "ssh/session.pyx":344 + /* "ssh/session.pyx":343 * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6299,14 +6282,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ * def send_debug(self, bytes message, int always_display): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 344, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":339 + /* "ssh/session.pyx":338 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6325,7 +6308,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_ignore(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":346 +/* "ssh/session.pyx":345 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6368,11 +6351,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_67send_debug(PyObject *__pyx_v_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_always_display)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 345, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 345, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6381,17 +6364,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_67send_debug(PyObject *__pyx_v_ values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_message = ((PyObject*)values[0]); - __pyx_v_always_display = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_always_display == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + __pyx_v_always_display = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_always_display == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.send_debug", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 345, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_66send_debug(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_message, __pyx_v_always_display); /* function exit code */ @@ -6416,7 +6399,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_debug", 0); - /* "ssh/session.pyx":347 + /* "ssh/session.pyx":346 * * def send_debug(self, bytes message, int always_display): * cdef char *c_message = message # <<<<<<<<<<<<<< @@ -6425,12 +6408,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 */ if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 347, __pyx_L1_error) + __PYX_ERR(0, 346, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) __pyx_v_c_message = __pyx_t_1; - /* "ssh/session.pyx":349 + /* "ssh/session.pyx":348 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6445,7 +6428,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":350 + /* "ssh/session.pyx":349 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_debug( # <<<<<<<<<<<<<< @@ -6455,7 +6438,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 __pyx_v_rc = ssh_send_debug(__pyx_v_self->_session, __pyx_v_c_message, __pyx_v_always_display); } - /* "ssh/session.pyx":349 + /* "ssh/session.pyx":348 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6474,7 +6457,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 } } - /* "ssh/session.pyx":352 + /* "ssh/session.pyx":351 * rc = c_ssh.ssh_send_debug( * self._session, c_message, always_display) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6482,14 +6465,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 * def gssapi_set_creds(self, creds not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 352, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":346 + /* "ssh/session.pyx":345 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6508,7 +6491,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66send_debug(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":354 +/* "ssh/session.pyx":353 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds not None): # <<<<<<<<<<<<<< @@ -6527,7 +6510,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_69gssapi_set_creds(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("gssapi_set_creds (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_creds) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "creds"); __PYX_ERR(0, 354, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "creds"); __PYX_ERR(0, 353, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_68gssapi_set_creds(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_creds)); @@ -6548,7 +6531,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68gssapi_set_creds(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gssapi_set_creds", 0); - /* "ssh/session.pyx":355 + /* "ssh/session.pyx":354 * * def gssapi_set_creds(self, creds not None): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6556,9 +6539,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68gssapi_set_creds(CYTHON_UNUSE * def service_request(self, bytes service): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 355, __pyx_L1_error) + __PYX_ERR(0, 354, __pyx_L1_error) - /* "ssh/session.pyx":354 + /* "ssh/session.pyx":353 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds not None): # <<<<<<<<<<<<<< @@ -6575,7 +6558,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68gssapi_set_creds(CYTHON_UNUSE return __pyx_r; } -/* "ssh/session.pyx":357 +/* "ssh/session.pyx":356 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6593,7 +6576,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_71service_request(PyObject *__p PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("service_request (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 357, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 356, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_70service_request(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_service)); /* function exit code */ @@ -6618,7 +6601,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("service_request", 0); - /* "ssh/session.pyx":359 + /* "ssh/session.pyx":358 * def service_request(self, bytes service): * cdef int rc * cdef char *c_service = service # <<<<<<<<<<<<<< @@ -6627,12 +6610,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ */ if (unlikely(__pyx_v_service == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 359, __pyx_L1_error) + __PYX_ERR(0, 358, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L1_error) __pyx_v_c_service = __pyx_t_1; - /* "ssh/session.pyx":360 + /* "ssh/session.pyx":359 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6647,7 +6630,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":361 + /* "ssh/session.pyx":360 * cdef char *c_service = service * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) # <<<<<<<<<<<<<< @@ -6657,7 +6640,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ __pyx_v_rc = ssh_service_request(__pyx_v_self->_session, __pyx_v_c_service); } - /* "ssh/session.pyx":360 + /* "ssh/session.pyx":359 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6676,7 +6659,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ } } - /* "ssh/session.pyx":362 + /* "ssh/session.pyx":361 * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6684,14 +6667,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ * # These are also excluded from Windows builds. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":357 + /* "ssh/session.pyx":356 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6710,7 +6693,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70service_request(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":366 +/* "ssh/session.pyx":365 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6728,7 +6711,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_73set_agent_channel(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_agent_channel (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 366, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 365, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_72set_agent_channel(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_channel)); /* function exit code */ @@ -6751,7 +6734,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_channel(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_channel", 0); - /* "ssh/session.pyx":368 + /* "ssh/session.pyx":367 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6766,7 +6749,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_channel(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":369 + /* "ssh/session.pyx":368 * cdef int rc * with nogil: * rc = c_ssh.ssh_set_agent_channel( # <<<<<<<<<<<<<< @@ -6776,7 +6759,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_channel(struct __py __pyx_v_rc = ssh_set_agent_channel(__pyx_v_self->_session, __pyx_v_channel->_channel); } - /* "ssh/session.pyx":368 + /* "ssh/session.pyx":367 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6795,7 +6778,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_channel(struct __py } } - /* "ssh/session.pyx":371 + /* "ssh/session.pyx":370 * rc = c_ssh.ssh_set_agent_channel( * self._session, channel._channel) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6803,14 +6786,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_channel(struct __py * def set_agent_socket(self, socket not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 371, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":366 + /* "ssh/session.pyx":365 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6829,7 +6812,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_channel(struct __py return __pyx_r; } -/* "ssh/session.pyx":373 +/* "ssh/session.pyx":372 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6848,7 +6831,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_75set_agent_socket(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_agent_socket (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_socket) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 373, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 372, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_74set_agent_socket(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_socket)); @@ -6873,17 +6856,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_agent_socket(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_socket", 0); - /* "ssh/session.pyx":375 + /* "ssh/session.pyx":374 * def set_agent_socket(self, socket not None): * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) # <<<<<<<<<<<<<< * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) */ - __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 374, __pyx_L1_error) __pyx_v__sock = __pyx_t_1; - /* "ssh/session.pyx":376 + /* "ssh/session.pyx":375 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6898,7 +6881,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_agent_socket(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":377 + /* "ssh/session.pyx":376 * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) # <<<<<<<<<<<<<< @@ -6908,7 +6891,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_agent_socket(struct __pyx __pyx_v_rc = ssh_set_agent_socket(__pyx_v_self->_session, __pyx_v__sock); } - /* "ssh/session.pyx":376 + /* "ssh/session.pyx":375 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6927,7 +6910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_agent_socket(struct __pyx } } - /* "ssh/session.pyx":378 + /* "ssh/session.pyx":377 * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6935,14 +6918,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_agent_socket(struct __pyx * def set_blocking(self, int blocking): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":373 + /* "ssh/session.pyx":372 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6961,7 +6944,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_agent_socket(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":380 +/* "ssh/session.pyx":379 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6981,7 +6964,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_blocking(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking (wrapper)", 0); assert(__pyx_arg_blocking); { - __pyx_v_blocking = __Pyx_PyInt_As_int(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L3_error) + __pyx_v_blocking = __Pyx_PyInt_As_int(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 379, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7001,7 +6984,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/session.pyx":381 + /* "ssh/session.pyx":380 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -7016,7 +6999,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":382 + /* "ssh/session.pyx":381 * def set_blocking(self, int blocking): * with nogil: * c_ssh.ssh_set_blocking(self._session, blocking) # <<<<<<<<<<<<<< @@ -7026,7 +7009,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_blocking(struct __pyx_obj ssh_set_blocking(__pyx_v_self->_session, __pyx_v_blocking); } - /* "ssh/session.pyx":381 + /* "ssh/session.pyx":380 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -7045,7 +7028,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_blocking(struct __pyx_obj } } - /* "ssh/session.pyx":380 + /* "ssh/session.pyx":379 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -7060,7 +7043,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":384 +/* "ssh/session.pyx":383 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7103,11 +7086,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_79set_counters(PyObject *__pyx_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rcounter)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 384, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 383, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 384, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 383, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7120,7 +7103,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_79set_counters(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 384, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 383, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.set_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7141,7 +7124,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_counters(CYTHON_UNUSED st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counters", 0); - /* "ssh/session.pyx":385 + /* "ssh/session.pyx":384 * * def set_counters(self, scounter, rcounter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -7149,9 +7132,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_counters(CYTHON_UNUSED st * def set_fd_except(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 385, __pyx_L1_error) + __PYX_ERR(0, 384, __pyx_L1_error) - /* "ssh/session.pyx":384 + /* "ssh/session.pyx":383 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7168,7 +7151,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_counters(CYTHON_UNUSED st return __pyx_r; } -/* "ssh/session.pyx":387 +/* "ssh/session.pyx":386 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7195,7 +7178,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_except(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_except", 0); - /* "ssh/session.pyx":388 + /* "ssh/session.pyx":387 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7210,7 +7193,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_except(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":389 + /* "ssh/session.pyx":388 * def set_fd_except(self): * with nogil: * c_ssh.ssh_set_fd_except(self._session) # <<<<<<<<<<<<<< @@ -7220,7 +7203,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_except(struct __pyx_ob ssh_set_fd_except(__pyx_v_self->_session); } - /* "ssh/session.pyx":388 + /* "ssh/session.pyx":387 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7239,7 +7222,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_except(struct __pyx_ob } } - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":386 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7254,7 +7237,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_except(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":391 +/* "ssh/session.pyx":390 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7281,7 +7264,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_toread(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_toread", 0); - /* "ssh/session.pyx":392 + /* "ssh/session.pyx":391 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7296,7 +7279,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_toread(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":393 + /* "ssh/session.pyx":392 * def set_fd_toread(self): * with nogil: * c_ssh.ssh_set_fd_toread(self._session) # <<<<<<<<<<<<<< @@ -7306,7 +7289,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_toread(struct __pyx_ob ssh_set_fd_toread(__pyx_v_self->_session); } - /* "ssh/session.pyx":392 + /* "ssh/session.pyx":391 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7325,7 +7308,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_toread(struct __pyx_ob } } - /* "ssh/session.pyx":391 + /* "ssh/session.pyx":390 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7340,7 +7323,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_toread(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":395 +/* "ssh/session.pyx":394 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7367,7 +7350,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84set_fd_towrite(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_towrite", 0); - /* "ssh/session.pyx":396 + /* "ssh/session.pyx":395 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7382,7 +7365,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84set_fd_towrite(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":397 + /* "ssh/session.pyx":396 * def set_fd_towrite(self): * with nogil: * c_ssh.ssh_set_fd_towrite(self._session) # <<<<<<<<<<<<<< @@ -7392,7 +7375,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84set_fd_towrite(struct __pyx_o ssh_set_fd_towrite(__pyx_v_self->_session); } - /* "ssh/session.pyx":396 + /* "ssh/session.pyx":395 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7411,7 +7394,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84set_fd_towrite(struct __pyx_o } } - /* "ssh/session.pyx":395 + /* "ssh/session.pyx":394 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7426,7 +7409,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84set_fd_towrite(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":399 +/* "ssh/session.pyx":398 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7453,7 +7436,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86silent_disconnect(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("silent_disconnect", 0); - /* "ssh/session.pyx":400 + /* "ssh/session.pyx":399 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7468,7 +7451,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86silent_disconnect(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":401 + /* "ssh/session.pyx":400 * def silent_disconnect(self): * with nogil: * c_ssh.ssh_silent_disconnect(self._session) # <<<<<<<<<<<<<< @@ -7478,7 +7461,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86silent_disconnect(struct __py ssh_silent_disconnect(__pyx_v_self->_session); } - /* "ssh/session.pyx":400 + /* "ssh/session.pyx":399 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7497,7 +7480,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86silent_disconnect(struct __py } } - /* "ssh/session.pyx":399 + /* "ssh/session.pyx":398 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7512,7 +7495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86silent_disconnect(struct __py return __pyx_r; } -/* "ssh/session.pyx":403 +/* "ssh/session.pyx":402 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7546,7 +7529,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_none(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_none", 0); - /* "ssh/session.pyx":405 + /* "ssh/session.pyx":404 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7561,16 +7544,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_none(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":406 + /* "ssh/session.pyx":405 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_auth_error_codes(rc, self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 406, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 405, __pyx_L4_error) - /* "ssh/session.pyx":407 + /* "ssh/session.pyx":406 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) # <<<<<<<<<<<<<< @@ -7580,7 +7563,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_none(struct __pyx_ob __pyx_v_rc = ssh_userauth_none(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":405 + /* "ssh/session.pyx":404 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7606,7 +7589,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_none(struct __pyx_ob } } - /* "ssh/session.pyx":408 + /* "ssh/session.pyx":407 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7614,14 +7597,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_none(struct __pyx_ob * def userauth_list(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":403 + /* "ssh/session.pyx":402 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7640,7 +7623,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_none(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":410 +/* "ssh/session.pyx":409 * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7674,7 +7657,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_list(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_list", 0); - /* "ssh/session.pyx":412 + /* "ssh/session.pyx":411 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7689,16 +7672,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_list(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":413 + /* "ssh/session.pyx":412 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 413, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 412, __pyx_L4_error) - /* "ssh/session.pyx":414 + /* "ssh/session.pyx":413 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) # <<<<<<<<<<<<<< @@ -7708,7 +7691,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_list(struct __pyx_ob __pyx_v_rc = ssh_userauth_list(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":412 + /* "ssh/session.pyx":411 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7734,7 +7717,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_list(struct __pyx_ob } } - /* "ssh/session.pyx":415 + /* "ssh/session.pyx":414 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7742,14 +7725,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_list(struct __pyx_ob * def userauth_try_publickey(self, SSHKey pubkey not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":410 + /* "ssh/session.pyx":409 * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7768,7 +7751,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_list(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":417 +/* "ssh/session.pyx":416 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7786,7 +7769,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_93userauth_try_publickey(PyObje PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_try_publickey (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 417, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 416, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_pubkey)); /* function exit code */ @@ -7810,7 +7793,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_try_publickey", 0); - /* "ssh/session.pyx":419 + /* "ssh/session.pyx":418 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7825,16 +7808,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(struct #endif /*try:*/ { - /* "ssh/session.pyx":420 + /* "ssh/session.pyx":419 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 420, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 419, __pyx_L4_error) - /* "ssh/session.pyx":421 + /* "ssh/session.pyx":420 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_try_publickey( # <<<<<<<<<<<<<< @@ -7844,7 +7827,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(struct __pyx_v_rc = ssh_userauth_try_publickey(__pyx_v_self->_session, NULL, __pyx_v_pubkey->_key); } - /* "ssh/session.pyx":419 + /* "ssh/session.pyx":418 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7870,7 +7853,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(struct } } - /* "ssh/session.pyx":423 + /* "ssh/session.pyx":422 * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7878,14 +7861,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(struct * def userauth_publickey(self, SSHKey privkey not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 423, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":417 + /* "ssh/session.pyx":416 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7904,7 +7887,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_try_publickey(struct return __pyx_r; } -/* "ssh/session.pyx":425 +/* "ssh/session.pyx":424 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7922,7 +7905,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_95userauth_publickey(PyObject * PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_publickey (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 425, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 424, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_94userauth_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_privkey)); /* function exit code */ @@ -7946,7 +7929,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_publickey(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey", 0); - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":426 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7961,16 +7944,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_publickey(struct __p #endif /*try:*/ { - /* "ssh/session.pyx":428 + /* "ssh/session.pyx":427 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 427, __pyx_L4_error) - /* "ssh/session.pyx":429 + /* "ssh/session.pyx":428 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey( # <<<<<<<<<<<<<< @@ -7980,7 +7963,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_publickey(struct __p __pyx_v_rc = ssh_userauth_publickey(__pyx_v_self->_session, NULL, __pyx_v_privkey->_key); } - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":426 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8006,7 +7989,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_publickey(struct __p } } - /* "ssh/session.pyx":431 + /* "ssh/session.pyx":430 * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8014,14 +7997,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_publickey(struct __p * # ssh_userauth_agent is excluded from libssh.h on Windows. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 431, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":425 + /* "ssh/session.pyx":424 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -8040,7 +8023,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_publickey(struct __p return __pyx_r; } -/* "ssh/session.pyx":435 +/* "ssh/session.pyx":434 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8059,7 +8042,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_97userauth_agent(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_agent (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 435, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 434, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_96userauth_agent(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_username)); @@ -8087,19 +8070,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_agent", 0); - /* "ssh/session.pyx":436 + /* "ssh/session.pyx":435 * IF not ON_WINDOWS: * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef char *c_username = b_username * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":437 + /* "ssh/session.pyx":436 * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8108,12 +8091,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 437, __pyx_L1_error) + __PYX_ERR(0, 436, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":439 + /* "ssh/session.pyx":438 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8128,16 +8111,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":440 + /* "ssh/session.pyx":439 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_auth_error_codes(rc, self._session) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 440, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 439, __pyx_L4_error) - /* "ssh/session.pyx":441 + /* "ssh/session.pyx":440 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) # <<<<<<<<<<<<<< @@ -8147,7 +8130,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o __pyx_v_rc = ssh_userauth_agent(__pyx_v_self->_session, __pyx_v_c_username); } - /* "ssh/session.pyx":439 + /* "ssh/session.pyx":438 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8173,7 +8156,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o } } - /* "ssh/session.pyx":442 + /* "ssh/session.pyx":441 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8181,14 +8164,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o * def userauth_publickey_auto(self, passphrase not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 442, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":435 + /* "ssh/session.pyx":434 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8208,7 +8191,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_agent(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":444 +/* "ssh/session.pyx":443 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8227,7 +8210,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_publickey_auto(PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_publickey_auto (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_passphrase) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 444, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 443, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_passphrase)); @@ -8255,19 +8238,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_auto", 0); - /* "ssh/session.pyx":445 + /* "ssh/session.pyx":444 * * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) # <<<<<<<<<<<<<< * cdef char *c_passphrase = b_passphrase * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":446 + /* "ssh/session.pyx":445 * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *c_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -8276,12 +8259,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 446, __pyx_L1_error) + __PYX_ERR(0, 445, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error) __pyx_v_c_passphrase = __pyx_t_2; - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":447 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8296,16 +8279,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc #endif /*try:*/ { - /* "ssh/session.pyx":449 + /* "ssh/session.pyx":448 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 448, __pyx_L4_error) - /* "ssh/session.pyx":450 + /* "ssh/session.pyx":449 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey_auto( # <<<<<<<<<<<<<< @@ -8315,7 +8298,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc __pyx_v_rc = ssh_userauth_publickey_auto(__pyx_v_self->_session, NULL, __pyx_v_c_passphrase); } - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":447 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8341,7 +8324,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc } } - /* "ssh/session.pyx":452 + /* "ssh/session.pyx":451 * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8349,14 +8332,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc * def userauth_password(self, username not None, password not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 452, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":444 + /* "ssh/session.pyx":443 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8376,7 +8359,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_publickey_auto(struc return __pyx_r; } -/* "ssh/session.pyx":454 +/* "ssh/session.pyx":453 * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8419,11 +8402,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_password(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_password)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 454, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 453, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 454, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 453, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8436,17 +8419,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_password(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 454, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 453, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_password", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 454, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 453, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_password) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 454, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 453, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_100userauth_password(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); @@ -8476,31 +8459,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_password", 0); - /* "ssh/session.pyx":455 + /* "ssh/session.pyx":454 * * def userauth_password(self, username not None, password not None): * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":456 + /* "ssh/session.pyx":455 * def userauth_password(self, username not None, password not None): * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) # <<<<<<<<<<<<<< * cdef char *c_username = b_username * cdef char *c_password = b_password */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_password = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":457 + /* "ssh/session.pyx":456 * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8509,12 +8492,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 457, __pyx_L1_error) + __PYX_ERR(0, 456, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":458 + /* "ssh/session.pyx":457 * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username * cdef char *c_password = b_password # <<<<<<<<<<<<<< @@ -8523,12 +8506,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p */ if (unlikely(__pyx_v_b_password == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 458, __pyx_L1_error) + __PYX_ERR(0, 457, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 457, __pyx_L1_error) __pyx_v_c_password = __pyx_t_2; - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":459 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8543,16 +8526,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p #endif /*try:*/ { - /* "ssh/session.pyx":461 + /* "ssh/session.pyx":460 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 461, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 460, __pyx_L4_error) - /* "ssh/session.pyx":462 + /* "ssh/session.pyx":461 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_password( # <<<<<<<<<<<<<< @@ -8562,7 +8545,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p __pyx_v_rc = ssh_userauth_password(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_password); } - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":459 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8588,7 +8571,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p } } - /* "ssh/session.pyx":464 + /* "ssh/session.pyx":463 * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8596,14 +8579,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p * def userauth_kbdint(self, username not None, submethods not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 464, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":454 + /* "ssh/session.pyx":453 * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8624,7 +8607,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_password(struct __p return __pyx_r; } -/* "ssh/session.pyx":466 +/* "ssh/session.pyx":465 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8667,11 +8650,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_103userauth_kbdint(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_submethods)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 466, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 465, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 466, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 465, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8684,17 +8667,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_103userauth_kbdint(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 466, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 465, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_kbdint", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 466, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 465, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_submethods) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 466, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 465, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_102userauth_kbdint(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_submethods); @@ -8724,31 +8707,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint", 0); - /* "ssh/session.pyx":467 + /* "ssh/session.pyx":466 * * def userauth_kbdint(self, username not None, submethods not None): * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":468 + /* "ssh/session.pyx":467 * def userauth_kbdint(self, username not None, submethods not None): * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) # <<<<<<<<<<<<<< * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_submethods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":469 + /* "ssh/session.pyx":468 * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8757,12 +8740,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 469, __pyx_L1_error) + __PYX_ERR(0, 468, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 468, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":470 + /* "ssh/session.pyx":469 * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods # <<<<<<<<<<<<<< @@ -8771,12 +8754,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_submethods == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 470, __pyx_L1_error) + __PYX_ERR(0, 469, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L1_error) __pyx_v_c_submethods = __pyx_t_2; - /* "ssh/session.pyx":472 + /* "ssh/session.pyx":471 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8791,16 +8774,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":473 + /* "ssh/session.pyx":472 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 473, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 472, __pyx_L4_error) - /* "ssh/session.pyx":474 + /* "ssh/session.pyx":473 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint( # <<<<<<<<<<<<<< @@ -8810,7 +8793,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx __pyx_v_rc = ssh_userauth_kbdint(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_submethods); } - /* "ssh/session.pyx":472 + /* "ssh/session.pyx":471 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8836,7 +8819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx } } - /* "ssh/session.pyx":476 + /* "ssh/session.pyx":475 * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8844,14 +8827,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx * def userauth_kbdint_getinstruction(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 476, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":466 + /* "ssh/session.pyx":465 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8872,7 +8855,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":478 +/* "ssh/session.pyx":477 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8906,7 +8889,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getinstructi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getinstruction", 0); - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":480 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8921,16 +8904,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getinstructi #endif /*try:*/ { - /* "ssh/session.pyx":482 + /* "ssh/session.pyx":481 * cdef const_char *_instruction * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( * self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 482, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 481, __pyx_L4_error) - /* "ssh/session.pyx":483 + /* "ssh/session.pyx":482 * with nogil: * _check_connected(self._session) * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( # <<<<<<<<<<<<<< @@ -8940,7 +8923,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getinstructi __pyx_v__instruction = ssh_userauth_kbdint_getinstruction(__pyx_v_self->_session); } - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":480 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8966,20 +8949,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getinstructi } } - /* "ssh/session.pyx":485 + /* "ssh/session.pyx":484 * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( * self._session) * b_instruction = to_str(_instruction) # <<<<<<<<<<<<<< * return b_instruction * */ - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 485, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_v_b_instruction = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":486 + /* "ssh/session.pyx":485 * self._session) * b_instruction = to_str(_instruction) * return b_instruction # <<<<<<<<<<<<<< @@ -8991,7 +8974,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getinstructi __pyx_r = __pyx_v_b_instruction; goto __pyx_L0; - /* "ssh/session.pyx":478 + /* "ssh/session.pyx":477 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -9011,7 +8994,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getinstructi return __pyx_r; } -/* "ssh/session.pyx":488 +/* "ssh/session.pyx":487 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -9045,7 +9028,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getname(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getname", 0); - /* "ssh/session.pyx":491 + /* "ssh/session.pyx":490 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9060,16 +9043,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getname(stru #endif /*try:*/ { - /* "ssh/session.pyx":492 + /* "ssh/session.pyx":491 * cdef const_char *_name * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 492, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 491, __pyx_L4_error) - /* "ssh/session.pyx":493 + /* "ssh/session.pyx":492 * with nogil: * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) # <<<<<<<<<<<<<< @@ -9079,7 +9062,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getname(stru __pyx_v__name = ssh_userauth_kbdint_getname(__pyx_v_self->_session); } - /* "ssh/session.pyx":491 + /* "ssh/session.pyx":490 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9105,20 +9088,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getname(stru } } - /* "ssh/session.pyx":494 + /* "ssh/session.pyx":493 * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) # <<<<<<<<<<<<<< * return b_name * */ - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 494, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 493, __pyx_L1_error) __pyx_v_b_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":495 + /* "ssh/session.pyx":494 * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) * return b_name # <<<<<<<<<<<<<< @@ -9130,7 +9113,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getname(stru __pyx_r = __pyx_v_b_name; goto __pyx_L0; - /* "ssh/session.pyx":488 + /* "ssh/session.pyx":487 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -9150,7 +9133,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getname(stru return __pyx_r; } -/* "ssh/session.pyx":497 +/* "ssh/session.pyx":496 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9183,7 +9166,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getnprompts( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnprompts", 0); - /* "ssh/session.pyx":499 + /* "ssh/session.pyx":498 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9198,16 +9181,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getnprompts( #endif /*try:*/ { - /* "ssh/session.pyx":500 + /* "ssh/session.pyx":499 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 500, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 499, __pyx_L4_error) - /* "ssh/session.pyx":501 + /* "ssh/session.pyx":500 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) # <<<<<<<<<<<<<< @@ -9217,7 +9200,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getnprompts( __pyx_v_rc = ssh_userauth_kbdint_getnprompts(__pyx_v_self->_session); } - /* "ssh/session.pyx":499 + /* "ssh/session.pyx":498 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9243,7 +9226,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getnprompts( } } - /* "ssh/session.pyx":502 + /* "ssh/session.pyx":501 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc # <<<<<<<<<<<<<< @@ -9251,13 +9234,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getnprompts( * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":497 + /* "ssh/session.pyx":496 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9276,7 +9259,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getnprompts( return __pyx_r; } -/* "ssh/session.pyx":504 +/* "ssh/session.pyx":503 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9319,11 +9302,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_111userauth_kbdint_getprompt(Py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_echo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 504, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 503, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 504, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 503, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9331,18 +9314,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_111userauth_kbdint_getprompt(Py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L3_error) + __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L3_error) __pyx_v_echo = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 504, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 503, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_kbdint_getprompt", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 504, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 503, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_echo); /* function exit code */ @@ -9368,17 +9351,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getprompt", 0); - /* "ssh/session.pyx":507 + /* "ssh/session.pyx":506 * cdef const_char *_prompt * cdef bytes b_prompt * cdef char *c_echo = echo # <<<<<<<<<<<<<< * with nogil: * _check_connected(self._session) */ - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error) __pyx_v_c_echo = __pyx_t_1; - /* "ssh/session.pyx":508 + /* "ssh/session.pyx":507 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9393,16 +9376,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(st #endif /*try:*/ { - /* "ssh/session.pyx":509 + /* "ssh/session.pyx":508 * cdef char *c_echo = echo * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( * self._session, i, c_echo) */ - __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 509, __pyx_L4_error) + __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 508, __pyx_L4_error) - /* "ssh/session.pyx":510 + /* "ssh/session.pyx":509 * with nogil: * _check_connected(self._session) * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( # <<<<<<<<<<<<<< @@ -9412,7 +9395,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(st __pyx_v__prompt = ssh_userauth_kbdint_getprompt(__pyx_v_self->_session, __pyx_v_i, __pyx_v_c_echo); } - /* "ssh/session.pyx":508 + /* "ssh/session.pyx":507 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9438,19 +9421,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(st } } - /* "ssh/session.pyx":512 + /* "ssh/session.pyx":511 * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( * self._session, i, c_echo) * b_prompt = _prompt # <<<<<<<<<<<<<< * return b_prompt * */ - __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_b_prompt = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":513 + /* "ssh/session.pyx":512 * self._session, i, c_echo) * b_prompt = _prompt * return b_prompt # <<<<<<<<<<<<<< @@ -9462,7 +9445,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(st __pyx_r = __pyx_v_b_prompt; goto __pyx_L0; - /* "ssh/session.pyx":504 + /* "ssh/session.pyx":503 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9482,7 +9465,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getprompt(st return __pyx_r; } -/* "ssh/session.pyx":515 +/* "ssh/session.pyx":514 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9515,7 +9498,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getnanswers( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnanswers", 0); - /* "ssh/session.pyx":517 + /* "ssh/session.pyx":516 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9530,16 +9513,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getnanswers( #endif /*try:*/ { - /* "ssh/session.pyx":518 + /* "ssh/session.pyx":517 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 518, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 517, __pyx_L4_error) - /* "ssh/session.pyx":519 + /* "ssh/session.pyx":518 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) # <<<<<<<<<<<<<< @@ -9549,7 +9532,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getnanswers( __pyx_v_rc = ssh_userauth_kbdint_getnanswers(__pyx_v_self->_session); } - /* "ssh/session.pyx":517 + /* "ssh/session.pyx":516 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9575,7 +9558,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getnanswers( } } - /* "ssh/session.pyx":520 + /* "ssh/session.pyx":519 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc # <<<<<<<<<<<<<< @@ -9583,13 +9566,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getnanswers( * def userauth_kbdint_getanswer(self, unsigned int i): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":515 + /* "ssh/session.pyx":514 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9608,7 +9591,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getnanswers( return __pyx_r; } -/* "ssh/session.pyx":522 +/* "ssh/session.pyx":521 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9628,7 +9611,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_kbdint_getanswer(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_kbdint_getanswer (wrapper)", 0); assert(__pyx_arg_i); { - __pyx_v_i = __Pyx_PyInt_As_unsigned_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 522, __pyx_L3_error) + __pyx_v_i = __Pyx_PyInt_As_unsigned_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9655,7 +9638,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_getanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getanswer", 0); - /* "ssh/session.pyx":525 + /* "ssh/session.pyx":524 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9670,16 +9653,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_getanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":526 + /* "ssh/session.pyx":525 * cdef bytes b_answer * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _answer = c_ssh.ssh_userauth_kbdint_getanswer( * self._session, i) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 526, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 525, __pyx_L4_error) - /* "ssh/session.pyx":527 + /* "ssh/session.pyx":526 * with nogil: * _check_connected(self._session) * _answer = c_ssh.ssh_userauth_kbdint_getanswer( # <<<<<<<<<<<<<< @@ -9689,7 +9672,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_getanswer(st __pyx_v__answer = ssh_userauth_kbdint_getanswer(__pyx_v_self->_session, __pyx_v_i); } - /* "ssh/session.pyx":525 + /* "ssh/session.pyx":524 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9715,19 +9698,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_getanswer(st } } - /* "ssh/session.pyx":529 + /* "ssh/session.pyx":528 * _answer = c_ssh.ssh_userauth_kbdint_getanswer( * self._session, i) * b_answer = _answer # <<<<<<<<<<<<<< * return b_answer * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_answer = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":530 + /* "ssh/session.pyx":529 * self._session, i) * b_answer = _answer * return b_answer # <<<<<<<<<<<<<< @@ -9739,7 +9722,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_getanswer(st __pyx_r = __pyx_v_b_answer; goto __pyx_L0; - /* "ssh/session.pyx":522 + /* "ssh/session.pyx":521 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9759,7 +9742,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_getanswer(st return __pyx_r; } -/* "ssh/session.pyx":532 +/* "ssh/session.pyx":531 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9802,11 +9785,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_117userauth_kbdint_setanswer(Py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_answer)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 532, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 531, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 532, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 531, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9814,18 +9797,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_117userauth_kbdint_setanswer(Py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L3_error) + __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 531, __pyx_L3_error) __pyx_v_answer = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 532, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 531, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_kbdint_setanswer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 532, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 531, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_answer); /* function exit code */ @@ -9851,17 +9834,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_setanswer", 0); - /* "ssh/session.pyx":533 + /* "ssh/session.pyx":532 * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): * cdef char *c_answer = answer # <<<<<<<<<<<<<< * cdef int rc * with nogil: */ - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error) __pyx_v_c_answer = __pyx_t_1; - /* "ssh/session.pyx":535 + /* "ssh/session.pyx":534 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9876,16 +9859,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":536 + /* "ssh/session.pyx":535 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) */ - __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 536, __pyx_L4_error) + __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 535, __pyx_L4_error) - /* "ssh/session.pyx":537 + /* "ssh/session.pyx":536 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_setanswer( # <<<<<<<<<<<<<< @@ -9895,7 +9878,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(st __pyx_v_rc = ssh_userauth_kbdint_setanswer(__pyx_v_self->_session, __pyx_v_i, ((const char *)__pyx_v_c_answer)); } - /* "ssh/session.pyx":535 + /* "ssh/session.pyx":534 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9921,7 +9904,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(st } } - /* "ssh/session.pyx":539 + /* "ssh/session.pyx":538 * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9929,14 +9912,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(st * def userauth_gssapi(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 539, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/session.pyx":532 + /* "ssh/session.pyx":531 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9955,7 +9938,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_kbdint_setanswer(st return __pyx_r; } -/* "ssh/session.pyx":541 +/* "ssh/session.pyx":540 * return handle_auth_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9989,7 +9972,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118userauth_gssapi(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_gssapi", 0); - /* "ssh/session.pyx":543 + /* "ssh/session.pyx":542 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10004,16 +9987,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118userauth_gssapi(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":544 + /* "ssh/session.pyx":543 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_auth_error_codes(rc, self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 544, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 543, __pyx_L4_error) - /* "ssh/session.pyx":545 + /* "ssh/session.pyx":544 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) # <<<<<<<<<<<<<< @@ -10023,7 +10006,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118userauth_gssapi(struct __pyx __pyx_v_rc = ssh_userauth_gssapi(__pyx_v_self->_session); } - /* "ssh/session.pyx":543 + /* "ssh/session.pyx":542 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10049,7 +10032,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118userauth_gssapi(struct __pyx } } - /* "ssh/session.pyx":546 + /* "ssh/session.pyx":545 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10057,14 +10040,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118userauth_gssapi(struct __pyx * def write_knownhost(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 546, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":541 + /* "ssh/session.pyx":540 * return handle_auth_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -10083,7 +10066,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118userauth_gssapi(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":548 +/* "ssh/session.pyx":547 * return handle_auth_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10116,7 +10099,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120write_knownhost(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_knownhost", 0); - /* "ssh/session.pyx":550 + /* "ssh/session.pyx":549 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10131,7 +10114,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120write_knownhost(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":551 + /* "ssh/session.pyx":550 * cdef int rc * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10141,7 +10124,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120write_knownhost(struct __pyx __pyx_v_rc = ssh_write_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":550 + /* "ssh/session.pyx":549 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10160,7 +10143,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120write_knownhost(struct __pyx } } - /* "ssh/session.pyx":552 + /* "ssh/session.pyx":551 * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10168,14 +10151,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120write_knownhost(struct __pyx * def dump_knownhost(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 552, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":548 + /* "ssh/session.pyx":547 * return handle_auth_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10194,7 +10177,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120write_knownhost(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":554 +/* "ssh/session.pyx":553 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10228,7 +10211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_knownhost", 0); - /* "ssh/session.pyx":557 + /* "ssh/session.pyx":556 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10243,7 +10226,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":558 + /* "ssh/session.pyx":557 * cdef bytes b_known_host * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10253,7 +10236,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ __pyx_v__known_host = ssh_dump_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":557 + /* "ssh/session.pyx":556 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10272,7 +10255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ } } - /* "ssh/session.pyx":559 + /* "ssh/session.pyx":558 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10282,7 +10265,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ __pyx_t_1 = ((__pyx_v__known_host == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":560 + /* "ssh/session.pyx":559 * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: * return # <<<<<<<<<<<<<< @@ -10293,7 +10276,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":559 + /* "ssh/session.pyx":558 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10302,19 +10285,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ */ } - /* "ssh/session.pyx":561 + /* "ssh/session.pyx":560 * if _known_host is NULL: * return * b_known_host = _known_host # <<<<<<<<<<<<<< * return b_known_host * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_known_host = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":562 + /* "ssh/session.pyx":561 * return * b_known_host = _known_host * return b_known_host # <<<<<<<<<<<<<< @@ -10326,7 +10309,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ __pyx_r = __pyx_v_b_known_host; goto __pyx_L0; - /* "ssh/session.pyx":554 + /* "ssh/session.pyx":553 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10346,7 +10329,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122dump_knownhost(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":564 +/* "ssh/session.pyx":563 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10380,7 +10363,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_clientbanner", 0); - /* "ssh/session.pyx":567 + /* "ssh/session.pyx":566 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10395,7 +10378,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":568 + /* "ssh/session.pyx":567 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) # <<<<<<<<<<<<<< @@ -10405,7 +10388,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py __pyx_v__banner = ssh_get_clientbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":567 + /* "ssh/session.pyx":566 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10424,7 +10407,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py } } - /* "ssh/session.pyx":569 + /* "ssh/session.pyx":568 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10434,7 +10417,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":570 + /* "ssh/session.pyx":569 * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10445,7 +10428,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":569 + /* "ssh/session.pyx":568 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10454,19 +10437,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py */ } - /* "ssh/session.pyx":571 + /* "ssh/session.pyx":570 * if _banner is NULL: * return * banner = _banner # <<<<<<<<<<<<<< * return banner * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":572 + /* "ssh/session.pyx":571 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10478,7 +10461,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":564 + /* "ssh/session.pyx":563 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10498,7 +10481,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_clientbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":574 +/* "ssh/session.pyx":573 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10532,7 +10515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_serverbanner", 0); - /* "ssh/session.pyx":577 + /* "ssh/session.pyx":576 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10547,7 +10530,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":578 + /* "ssh/session.pyx":577 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) # <<<<<<<<<<<<<< @@ -10557,7 +10540,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py __pyx_v__banner = ssh_get_serverbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":577 + /* "ssh/session.pyx":576 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10576,7 +10559,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py } } - /* "ssh/session.pyx":579 + /* "ssh/session.pyx":578 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10586,7 +10569,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":580 + /* "ssh/session.pyx":579 * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10597,7 +10580,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":579 + /* "ssh/session.pyx":578 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10606,19 +10589,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py */ } - /* "ssh/session.pyx":581 + /* "ssh/session.pyx":580 * if _banner is NULL: * return * banner = _banner # <<<<<<<<<<<<<< * return banner * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":582 + /* "ssh/session.pyx":581 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10630,7 +10613,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":574 + /* "ssh/session.pyx":573 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10650,7 +10633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_serverbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":584 +/* "ssh/session.pyx":583 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10684,7 +10667,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_kex_algo", 0); - /* "ssh/session.pyx":587 + /* "ssh/session.pyx":586 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10699,7 +10682,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":588 + /* "ssh/session.pyx":587 * cdef bytes algo * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) # <<<<<<<<<<<<<< @@ -10709,7 +10692,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob __pyx_v__algo = ssh_get_kex_algo(__pyx_v_self->_session); } - /* "ssh/session.pyx":587 + /* "ssh/session.pyx":586 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10728,7 +10711,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob } } - /* "ssh/session.pyx":589 + /* "ssh/session.pyx":588 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10738,7 +10721,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob __pyx_t_1 = ((__pyx_v__algo == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":590 + /* "ssh/session.pyx":589 * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: * return # <<<<<<<<<<<<<< @@ -10749,7 +10732,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":589 + /* "ssh/session.pyx":588 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10758,19 +10741,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob */ } - /* "ssh/session.pyx":591 + /* "ssh/session.pyx":590 * if _algo is NULL: * return * algo = _algo # <<<<<<<<<<<<<< * return algo * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_algo = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":592 + /* "ssh/session.pyx":591 * return * algo = _algo * return algo # <<<<<<<<<<<<<< @@ -10782,7 +10765,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob __pyx_r = __pyx_v_algo; goto __pyx_L0; - /* "ssh/session.pyx":584 + /* "ssh/session.pyx":583 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10802,7 +10785,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_kex_algo(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":594 +/* "ssh/session.pyx":593 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10836,7 +10819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_in", 0); - /* "ssh/session.pyx":597 + /* "ssh/session.pyx":596 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10851,7 +10834,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":598 + /* "ssh/session.pyx":597 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) # <<<<<<<<<<<<<< @@ -10861,7 +10844,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o __pyx_v__cipher = ssh_get_cipher_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":597 + /* "ssh/session.pyx":596 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10880,7 +10863,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o } } - /* "ssh/session.pyx":599 + /* "ssh/session.pyx":598 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10890,7 +10873,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":600 + /* "ssh/session.pyx":599 * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10901,7 +10884,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":599 + /* "ssh/session.pyx":598 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10910,19 +10893,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o */ } - /* "ssh/session.pyx":601 + /* "ssh/session.pyx":600 * if _cipher is NULL: * return * cipher = _cipher # <<<<<<<<<<<<<< * return cipher * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":602 + /* "ssh/session.pyx":601 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10934,7 +10917,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":594 + /* "ssh/session.pyx":593 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10954,7 +10937,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_in(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":604 +/* "ssh/session.pyx":603 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -10988,7 +10971,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_out", 0); - /* "ssh/session.pyx":607 + /* "ssh/session.pyx":606 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -11003,7 +10986,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":608 + /* "ssh/session.pyx":607 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) # <<<<<<<<<<<<<< @@ -11013,7 +10996,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ __pyx_v__cipher = ssh_get_cipher_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":607 + /* "ssh/session.pyx":606 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -11032,7 +11015,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ } } - /* "ssh/session.pyx":609 + /* "ssh/session.pyx":608 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -11042,7 +11025,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":610 + /* "ssh/session.pyx":609 * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -11053,7 +11036,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":609 + /* "ssh/session.pyx":608 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -11062,19 +11045,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ */ } - /* "ssh/session.pyx":611 + /* "ssh/session.pyx":610 * if _cipher is NULL: * return * cipher = _cipher # <<<<<<<<<<<<<< * return cipher * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":612 + /* "ssh/session.pyx":611 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -11086,7 +11069,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":604 + /* "ssh/session.pyx":603 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -11106,7 +11089,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_cipher_out(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":614 +/* "ssh/session.pyx":613 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11140,7 +11123,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_in", 0); - /* "ssh/session.pyx":617 + /* "ssh/session.pyx":616 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11155,7 +11138,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":618 + /* "ssh/session.pyx":617 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) # <<<<<<<<<<<<<< @@ -11165,7 +11148,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj __pyx_v__hmac = ssh_get_hmac_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":617 + /* "ssh/session.pyx":616 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11184,7 +11167,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj } } - /* "ssh/session.pyx":619 + /* "ssh/session.pyx":618 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11194,7 +11177,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":620 + /* "ssh/session.pyx":619 * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11205,7 +11188,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":619 + /* "ssh/session.pyx":618 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11214,19 +11197,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj */ } - /* "ssh/session.pyx":621 + /* "ssh/session.pyx":620 * if _hmac is NULL: * return * hmac = _hmac # <<<<<<<<<<<<<< * return hmac * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":622 + /* "ssh/session.pyx":621 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11238,7 +11221,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":614 + /* "ssh/session.pyx":613 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11258,7 +11241,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_in(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":624 +/* "ssh/session.pyx":623 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11292,7 +11275,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_out", 0); - /* "ssh/session.pyx":627 + /* "ssh/session.pyx":626 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11307,7 +11290,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":628 + /* "ssh/session.pyx":627 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) # <<<<<<<<<<<<<< @@ -11317,7 +11300,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob __pyx_v__hmac = ssh_get_hmac_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":627 + /* "ssh/session.pyx":626 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11336,7 +11319,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob } } - /* "ssh/session.pyx":629 + /* "ssh/session.pyx":628 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11346,7 +11329,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":630 + /* "ssh/session.pyx":629 * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11357,7 +11340,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":629 + /* "ssh/session.pyx":628 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11366,19 +11349,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob */ } - /* "ssh/session.pyx":631 + /* "ssh/session.pyx":630 * if _hmac is NULL: * return * hmac = _hmac # <<<<<<<<<<<<<< * return hmac * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":632 + /* "ssh/session.pyx":631 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11390,7 +11373,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":624 + /* "ssh/session.pyx":623 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11410,7 +11393,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_hmac_out(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":634 +/* "ssh/session.pyx":633 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11445,7 +11428,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error", 0); - /* "ssh/session.pyx":637 + /* "ssh/session.pyx":636 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11460,7 +11443,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":638 + /* "ssh/session.pyx":637 * cdef bytes b_error * with nogil: * error = c_ssh.ssh_get_error(self._session) # <<<<<<<<<<<<<< @@ -11470,7 +11453,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 __pyx_v_error = ssh_get_error(__pyx_v_self->_session); } - /* "ssh/session.pyx":637 + /* "ssh/session.pyx":636 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11489,7 +11472,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 } } - /* "ssh/session.pyx":639 + /* "ssh/session.pyx":638 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11499,7 +11482,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v_error == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":640 + /* "ssh/session.pyx":639 * error = c_ssh.ssh_get_error(self._session) * if error is NULL: * return # <<<<<<<<<<<<<< @@ -11510,7 +11493,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":639 + /* "ssh/session.pyx":638 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11519,19 +11502,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 */ } - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":640 * if error is NULL: * return * b_error = error # <<<<<<<<<<<<<< * return to_str(b_error) * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_error = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":642 + /* "ssh/session.pyx":641 * return * b_error = error * return to_str(b_error) # <<<<<<<<<<<<<< @@ -11539,14 +11522,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 * def get_error_code(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":634 + /* "ssh/session.pyx":633 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11566,7 +11549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":644 +/* "ssh/session.pyx":643 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11598,7 +11581,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140get_error_code(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_code", 0); - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":645 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11613,7 +11596,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140get_error_code(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":646 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) # <<<<<<<<<<<<<< @@ -11623,7 +11606,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140get_error_code(struct __pyx_ __pyx_v_rc = ssh_get_error_code(__pyx_v_self->_session); } - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":645 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11642,7 +11625,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140get_error_code(struct __pyx_ } } - /* "ssh/session.pyx":648 + /* "ssh/session.pyx":647 * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) * return rc # <<<<<<<<<<<<<< @@ -11650,13 +11633,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140get_error_code(struct __pyx_ * def scp_new(self, int mode, location not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":644 + /* "ssh/session.pyx":643 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11675,7 +11658,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140get_error_code(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":650 +/* "ssh/session.pyx":649 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -11718,11 +11701,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_143scp_new(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_location)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 650, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 649, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 650, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 649, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11730,19 +11713,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_143scp_new(PyObject *__pyx_v_se values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L3_error) __pyx_v_location = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 650, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 649, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.scp_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_location) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 650, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 649, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_142scp_new(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_mode, __pyx_v_location); @@ -11770,19 +11753,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scp_new", 0); - /* "ssh/session.pyx":653 + /* "ssh/session.pyx":652 * """Create and initialise SCP channel""" * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) # <<<<<<<<<<<<<< * cdef char *c_location = b_location * with nogil: */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_location = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":654 + /* "ssh/session.pyx":653 * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location # <<<<<<<<<<<<<< @@ -11791,12 +11774,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_location == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 654, __pyx_L1_error) + __PYX_ERR(0, 653, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error) __pyx_v_c_location = __pyx_t_2; - /* "ssh/session.pyx":655 + /* "ssh/session.pyx":654 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11811,7 +11794,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":656 + /* "ssh/session.pyx":655 * cdef char *c_location = b_location * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) # <<<<<<<<<<<<<< @@ -11820,7 +11803,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss */ __pyx_v__scp = ssh_scp_new(__pyx_v_self->_session, __pyx_v_mode, __pyx_v_c_location); - /* "ssh/session.pyx":657 + /* "ssh/session.pyx":656 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11830,7 +11813,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((__pyx_v__scp == NULL) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":658 + /* "ssh/session.pyx":657 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11843,7 +11826,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":659 + /* "ssh/session.pyx":658 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11852,30 +11835,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":660 + /* "ssh/session.pyx":659 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) */ - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 659, __pyx_L8_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 658, __pyx_L8_error) - /* "ssh/session.pyx":659 + /* "ssh/session.pyx":658 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":658 + /* "ssh/session.pyx":657 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11898,7 +11881,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":657 + /* "ssh/session.pyx":656 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11907,7 +11890,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":661 + /* "ssh/session.pyx":660 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: # <<<<<<<<<<<<<< @@ -11917,7 +11900,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((ssh_scp_init(__pyx_v__scp) != SSH_OK) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":662 + /* "ssh/session.pyx":661 * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) # <<<<<<<<<<<<<< @@ -11926,7 +11909,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss */ ssh_scp_free(__pyx_v__scp); - /* "ssh/session.pyx":663 + /* "ssh/session.pyx":662 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11939,7 +11922,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":664 + /* "ssh/session.pyx":663 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11948,29 +11931,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":665 + /* "ssh/session.pyx":664 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * return SCP.from_ptr(_scp, self) */ - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 664, __pyx_L12_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 663, __pyx_L12_error) - /* "ssh/session.pyx":664 + /* "ssh/session.pyx":663 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * return SCP.from_ptr(_scp, self) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L12_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_return; } - /* "ssh/session.pyx":663 + /* "ssh/session.pyx":662 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11993,7 +11976,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":661 + /* "ssh/session.pyx":660 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: # <<<<<<<<<<<<<< @@ -12003,7 +11986,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":655 + /* "ssh/session.pyx":654 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -12036,19 +12019,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_142scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":666 + /* "ssh/session.pyx":665 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * return SCP.from_ptr(_scp, self) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_3ssh_3scp_SCP->from_ptr(__pyx_v__scp, __pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_3ssh_3scp_SCP->from_ptr(__pyx_v__scp, __pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":650 + /* "ssh/session.pyx":649 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -12474,6 +12457,7 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_ChannelOpenFailure, __pyx_k_ChannelOpenFailure, sizeof(__pyx_k_ChannelOpenFailure), 0, 0, 1, 1}, {&__pyx_n_s_InvalidAPIUse, __pyx_k_InvalidAPIUse, sizeof(__pyx_k_InvalidAPIUse), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, @@ -12528,7 +12512,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 64, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 221, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -12940,11 +12924,11 @@ if (!__Pyx_RefNanny) { /* "ssh/session.pyx":29 * from scp cimport SCP * - * from exceptions import OptionError, InvalidAPIUse # <<<<<<<<<<<<<< + * from exceptions import OptionError, InvalidAPIUse, ChannelOpenFailure # <<<<<<<<<<<<<< * * from c_sftp cimport sftp_session, sftp_new, sftp_init */ - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_OptionError); __Pyx_GIVEREF(__pyx_n_s_OptionError); @@ -12952,6 +12936,9 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_s_InvalidAPIUse); __Pyx_GIVEREF(__pyx_n_s_InvalidAPIUse); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_InvalidAPIUse); + __Pyx_INCREF(__pyx_n_s_ChannelOpenFailure); + __Pyx_GIVEREF(__pyx_n_s_ChannelOpenFailure); + PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_ChannelOpenFailure); __pyx_t_2 = __Pyx_Import(__pyx_n_s_exceptions, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12963,6 +12950,10 @@ if (!__Pyx_RefNanny) { __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidAPIUse, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ChannelOpenFailure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelOpenFailure, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "ssh/session.pyx":36 diff --git a/ssh/session.pyx b/ssh/session.pyx index 08ce7ef..9df087e 100644 --- a/ssh/session.pyx +++ b/ssh/session.pyx @@ -26,7 +26,7 @@ from key cimport SSHKey from sftp cimport SFTP from scp cimport SCP -from exceptions import OptionError, InvalidAPIUse +from exceptions import OptionError, InvalidAPIUse, ChannelOpenFailure from c_sftp cimport sftp_session, sftp_new, sftp_init cimport c_ssh @@ -97,8 +97,7 @@ cdef class Session: _check_connected(self._session) _channel = c_ssh.ssh_channel_new(self._session) if _channel is NULL: - return handle_error_codes( - c_ssh.ssh_get_error_code(self._session), self._session) + raise ChannelOpenFailure channel = Channel.from_ptr(_channel, self) return channel diff --git a/tests/test_session.py b/tests/test_session.py index a36c522..27435f0 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -80,7 +80,7 @@ def test_should_not_segfault(self): def test_disconnect(self): self._auth() chan = self.session.channel_new() - chan.open_session() + self.assertEqual(chan.open_session(), 0) chan.close() self.session.disconnect() del chan @@ -158,3 +158,17 @@ def test_agent_auth(self): self.session.connect() self.assertRaises( AuthenticationDenied, self.session.userauth_agent, self.user) + + def test_set_timeout(self): + session = Session() + self.assertEqual(session.options_set(options.TIMEOUT, "1000"), 0) + self.assertEqual(session.options_set(options.TIMEOUT_USEC, "1000"), 0) + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.connect((self.host, self.port)) + session = Session() + session.options_set(options.USER, self.user) + session.options_set(options.HOST, self.host) + session.options_set_port(self.port) + self.assertEqual(session.set_socket(sock), 0) + self.assertEqual(session.options_set(options.TIMEOUT, "1000"), 0) + self.assertEqual(session.options_set(options.TIMEOUT_USEC, "1000"), 0)