From 48cc4b1a4f0db1fcc1e535fea6db1409c6488e5c Mon Sep 17 00:00:00 2001 From: Panos Date: Fri, 21 Aug 2020 12:01:42 +0100 Subject: [PATCH 01/11] Fixed issue with channel double free when session open channel fails --- ssh/channel.c | 1635 ++++++++++++++++++++++---------------------- ssh/channel.pxd | 2 +- ssh/channel.pyx | 67 +- ssh/session.c | 1722 +++++++++++++++++++++++------------------------ ssh/session.pyx | 11 +- 5 files changed, 1723 insertions(+), 1714 deletions(-) diff --git a/ssh/channel.c b/ssh/channel.c index be712b13..a2d9c56b 100644 --- a/ssh/channel.c +++ b/ssh/channel.c @@ -861,24 +861,24 @@ struct __pyx_obj_3ssh_7session_Session { * * cdef class Channel: # <<<<<<<<<<<<<< * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session + * cdef Session _session */ struct __pyx_obj_3ssh_7channel_Channel { PyObject_HEAD struct __pyx_vtabstruct_3ssh_7channel_Channel *__pyx_vtab; ssh_channel _channel; - struct __pyx_obj_3ssh_7session_Session *session; + struct __pyx_obj_3ssh_7session_Session *_session; int closed; }; -/* "ssh/channel.pyx":25 +/* "ssh/channel.pyx":27 * * * cdef class Channel: # <<<<<<<<<<<<<< * - * def __cinit__(self): + * def __cinit__(self, Session session): */ struct __pyx_vtabstruct_3ssh_7channel_Channel { @@ -960,13 +960,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); -/* RaiseArgTupleInvalid.proto */ -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); - -/* KeywordStringCheck.proto */ -static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); - /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); @@ -975,6 +968,16 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; @@ -1046,12 +1049,6 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); -/* ArgTypeTest.proto */ -#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ - ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ - __Pyx__ArgTypeTest(obj, type, name, exact)) -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); - /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); @@ -1240,6 +1237,7 @@ static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_Channel[] = "Channel"; static const char __pyx_k_readfds[] = "readfds"; +static const char __pyx_k_session[] = "session"; static const char __pyx_k_timeout[] = "timeout"; static const char __pyx_k_channels[] = "channels"; static const char __pyx_k_getstate[] = "__getstate__"; @@ -1289,6 +1287,7 @@ static PyObject *__pyx_n_s_remoteport; static PyObject *__pyx_n_s_row; static PyObject *__pyx_n_s_rows; static PyObject *__pyx_n_s_screen_number; +static PyObject *__pyx_n_s_session; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_setstate_cython; static PyObject *__pyx_n_s_single_connection; @@ -1299,8 +1298,9 @@ static PyObject *__pyx_n_s_terminal; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_timeout; static PyObject *__pyx_n_s_value; -static int __pyx_pf_3ssh_7channel_7Channel___cinit__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ +static int __pyx_pf_3ssh_7channel_7Channel___cinit__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self, struct __pyx_obj_3ssh_7session_Session *__pyx_v_session); /* proto */ static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_3ssh_7channel_7Channel_7session___get__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ @@ -1336,7 +1336,6 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_72select(CYTHON_UNUSED struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_channels, CYTHON_UNUSED PyObject *__pyx_v_outchannels, CYTHON_UNUSED PyObject *__pyx_v_maxfd, CYTHON_UNUSED PyObject *__pyx_v_readfds, CYTHON_UNUSED PyObject *__pyx_v_timeout); /* proto */ -static PyObject *__pyx_pf_3ssh_7channel_7Channel_7session___get__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6closed___get__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7channel_7Channel_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ @@ -1346,50 +1345,105 @@ static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; /* Late includes */ -/* "ssh/channel.pyx":27 +/* "ssh/channel.pyx":29 * cdef class Channel: * - * def __cinit__(self): # <<<<<<<<<<<<<< + * def __cinit__(self, Session session): # <<<<<<<<<<<<<< * self.closed = False - * + * self._session = session */ /* Python wrapper */ static int __pyx_pw_3ssh_7channel_7Channel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_3ssh_7channel_7Channel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_3ssh_7session_Session *__pyx_v_session = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); - if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} - if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; - __pyx_r = __pyx_pf_3ssh_7channel_7Channel___cinit__(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self)); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_session,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_session)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 29, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_session = ((struct __pyx_obj_3ssh_7session_Session *)values[0]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("ssh.channel.Channel.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_session), __pyx_ptype_3ssh_7session_Session, 1, "session", 0))) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_r = __pyx_pf_3ssh_7channel_7Channel___cinit__(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_session); /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_3ssh_7channel_7Channel___cinit__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self) { +static int __pyx_pf_3ssh_7channel_7Channel___cinit__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self, struct __pyx_obj_3ssh_7session_Session *__pyx_v_session) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "ssh/channel.pyx":28 + /* "ssh/channel.pyx":30 * - * def __cinit__(self): + * def __cinit__(self, Session session): * self.closed = False # <<<<<<<<<<<<<< + * self._session = session * - * def __dealloc__(self): */ __pyx_v_self->closed = 0; - /* "ssh/channel.pyx":27 + /* "ssh/channel.pyx":31 + * def __cinit__(self, Session session): + * self.closed = False + * self._session = session # <<<<<<<<<<<<<< + * + * def __dealloc__(self): + */ + __Pyx_INCREF(((PyObject *)__pyx_v_session)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_session)); + __Pyx_GOTREF(__pyx_v_self->_session); + __Pyx_DECREF(((PyObject *)__pyx_v_self->_session)); + __pyx_v_self->_session = __pyx_v_session; + + /* "ssh/channel.pyx":29 * cdef class Channel: * - * def __cinit__(self): # <<<<<<<<<<<<<< + * def __cinit__(self, Session session): # <<<<<<<<<<<<<< * self.closed = False - * + * self._session = session */ /* function exit code */ @@ -1398,11 +1452,11 @@ static int __pyx_pf_3ssh_7channel_7Channel___cinit__(struct __pyx_obj_3ssh_7chan return __pyx_r; } -/* "ssh/channel.pyx":30 - * self.closed = False +/* "ssh/channel.pyx":33 + * self._session = session * * def __dealloc__(self): # <<<<<<<<<<<<<< - * if self._channel is not NULL: + * if self._channel is not NULL and self._session is not None: * c_ssh.ssh_channel_free(self._channel) */ @@ -1420,50 +1474,61 @@ static void __pyx_pw_3ssh_7channel_7Channel_3__dealloc__(PyObject *__pyx_v_self) static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "ssh/channel.pyx":31 + /* "ssh/channel.pyx":34 * * def __dealloc__(self): - * if self._channel is not NULL: # <<<<<<<<<<<<<< + * if self._channel is not NULL and self._session is not None: # <<<<<<<<<<<<<< * c_ssh.ssh_channel_free(self._channel) * self._channel = NULL */ - __pyx_t_1 = ((__pyx_v_self->_channel != NULL) != 0); + __pyx_t_2 = ((__pyx_v_self->_channel != NULL) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (((PyObject *)__pyx_v_self->_session) != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "ssh/channel.pyx":32 + /* "ssh/channel.pyx":35 * def __dealloc__(self): - * if self._channel is not NULL: + * if self._channel is not NULL and self._session is not None: * c_ssh.ssh_channel_free(self._channel) # <<<<<<<<<<<<<< * self._channel = NULL * */ ssh_channel_free(__pyx_v_self->_channel); - /* "ssh/channel.pyx":33 - * if self._channel is not NULL: + /* "ssh/channel.pyx":36 + * if self._channel is not NULL and self._session is not None: * c_ssh.ssh_channel_free(self._channel) * self._channel = NULL # <<<<<<<<<<<<<< * - * @staticmethod + * @property */ __pyx_v_self->_channel = NULL; - /* "ssh/channel.pyx":31 + /* "ssh/channel.pyx":34 * * def __dealloc__(self): - * if self._channel is not NULL: # <<<<<<<<<<<<<< + * if self._channel is not NULL and self._session is not None: # <<<<<<<<<<<<<< * c_ssh.ssh_channel_free(self._channel) * self._channel = NULL */ } - /* "ssh/channel.pyx":30 - * self.closed = False + /* "ssh/channel.pyx":33 + * self._session = session * * def __dealloc__(self): # <<<<<<<<<<<<<< - * if self._channel is not NULL: + * if self._channel is not NULL and self._session is not None: * c_ssh.ssh_channel_free(self._channel) */ @@ -1471,11 +1536,64 @@ static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7 __Pyx_RefNannyFinishContext(); } -/* "ssh/channel.pyx":36 +/* "ssh/channel.pyx":39 + * + * @property + * def session(self): # <<<<<<<<<<<<<< + * """Originating session.""" + * return self._session + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_3ssh_7channel_7Channel_7session_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_3ssh_7channel_7Channel_7session_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_3ssh_7channel_7Channel_7session___get__(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_3ssh_7channel_7Channel_7session___get__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "ssh/channel.pyx":41 + * def session(self): + * """Originating session.""" + * return self._session # <<<<<<<<<<<<<< + * + * @staticmethod + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self->_session)); + __pyx_r = ((PyObject *)__pyx_v_self->_session); + goto __pyx_L0; + + /* "ssh/channel.pyx":39 + * + * @property + * def session(self): # <<<<<<<<<<<<<< + * """Originating session.""" + * return self._session + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "ssh/channel.pyx":44 * * @staticmethod * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): # <<<<<<<<<<<<<< - * cdef Channel chan = Channel.__new__(Channel) + * cdef Channel chan = Channel.__new__(Channel, session) * chan._channel = _chan */ @@ -1484,48 +1602,42 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr struct __pyx_obj_3ssh_7channel_Channel *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "ssh/channel.pyx":37 + /* "ssh/channel.pyx":45 * @staticmethod * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): - * cdef Channel chan = Channel.__new__(Channel) # <<<<<<<<<<<<<< + * cdef Channel chan = Channel.__new__(Channel, session) # <<<<<<<<<<<<<< * chan._channel = _chan - * chan.session = session + * return chan */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_3ssh_7channel_Channel(((PyTypeObject *)__pyx_ptype_3ssh_7channel_Channel), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_v_chan = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_session)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_session)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_session)); + __pyx_t_2 = ((PyObject *)__pyx_tp_new_3ssh_7channel_Channel(((PyTypeObject *)__pyx_ptype_3ssh_7channel_Channel), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_chan = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_2); + __pyx_t_2 = 0; - /* "ssh/channel.pyx":38 + /* "ssh/channel.pyx":46 * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): - * cdef Channel chan = Channel.__new__(Channel) + * cdef Channel chan = Channel.__new__(Channel, session) * chan._channel = _chan # <<<<<<<<<<<<<< - * chan.session = session - * return chan - */ - __pyx_v_chan->_channel = __pyx_v__chan; - - /* "ssh/channel.pyx":39 - * cdef Channel chan = Channel.__new__(Channel) - * chan._channel = _chan - * chan.session = session # <<<<<<<<<<<<<< * return chan * */ - __Pyx_INCREF(((PyObject *)__pyx_v_session)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_session)); - __Pyx_GOTREF(__pyx_v_chan->session); - __Pyx_DECREF(((PyObject *)__pyx_v_chan->session)); - __pyx_v_chan->session = __pyx_v_session; + __pyx_v_chan->_channel = __pyx_v__chan; - /* "ssh/channel.pyx":40 + /* "ssh/channel.pyx":47 + * cdef Channel chan = Channel.__new__(Channel, session) * chan._channel = _chan - * chan.session = session * return chan # <<<<<<<<<<<<<< * * def close(self): @@ -1535,17 +1647,18 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr __pyx_r = __pyx_v_chan; goto __pyx_L0; - /* "ssh/channel.pyx":36 + /* "ssh/channel.pyx":44 * * @staticmethod * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): # <<<<<<<<<<<<<< - * cdef Channel chan = Channel.__new__(Channel) + * cdef Channel chan = Channel.__new__(Channel, session) * chan._channel = _chan */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("ssh.channel.Channel.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -1555,7 +1668,7 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr return __pyx_r; } -/* "ssh/channel.pyx":42 +/* "ssh/channel.pyx":49 * return chan * * def close(self): # <<<<<<<<<<<<<< @@ -1589,7 +1702,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); - /* "ssh/channel.pyx":44 + /* "ssh/channel.pyx":51 * def close(self): * cdef int rc * if self.closed: # <<<<<<<<<<<<<< @@ -1599,7 +1712,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_t_1 = (__pyx_v_self->closed != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":45 + /* "ssh/channel.pyx":52 * cdef int rc * if self.closed: * return 0 # <<<<<<<<<<<<<< @@ -1611,7 +1724,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_r = __pyx_int_0; goto __pyx_L0; - /* "ssh/channel.pyx":44 + /* "ssh/channel.pyx":51 * def close(self): * cdef int rc * if self.closed: # <<<<<<<<<<<<<< @@ -1620,7 +1733,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c */ } - /* "ssh/channel.pyx":46 + /* "ssh/channel.pyx":53 * if self.closed: * return 0 * with nogil: # <<<<<<<<<<<<<< @@ -1635,7 +1748,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":47 + /* "ssh/channel.pyx":54 * return 0 * with nogil: * rc = c_ssh.ssh_channel_close(self._channel) # <<<<<<<<<<<<<< @@ -1645,7 +1758,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_v_rc = ssh_channel_close(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":46 + /* "ssh/channel.pyx":53 * if self.closed: * return 0 * with nogil: # <<<<<<<<<<<<<< @@ -1664,50 +1777,50 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":48 + /* "ssh/channel.pyx":55 * with nogil: * rc = c_ssh.ssh_channel_close(self._channel) * if rc == 0: # <<<<<<<<<<<<<< * self.closed = True - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_t_1 = ((__pyx_v_rc == 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":49 + /* "ssh/channel.pyx":56 * rc = c_ssh.ssh_channel_close(self._channel) * if rc == 0: * self.closed = True # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_self->closed = 1; - /* "ssh/channel.pyx":48 + /* "ssh/channel.pyx":55 * with nogil: * rc = c_ssh.ssh_channel_close(self._channel) * if rc == 0: # <<<<<<<<<<<<<< * self.closed = True - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ } - /* "ssh/channel.pyx":50 + /* "ssh/channel.pyx":57 * if rc == 0: * self.closed = True - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def get_exit_status(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 50, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":42 + /* "ssh/channel.pyx":49 * return chan * * def close(self): # <<<<<<<<<<<<<< @@ -1726,8 +1839,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c return __pyx_r; } -/* "ssh/channel.pyx":52 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":59 + * return handle_error_codes(rc, self._session._session) * * def get_exit_status(self): # <<<<<<<<<<<<<< * cdef int rc @@ -1758,7 +1871,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_exit_status", 0); - /* "ssh/channel.pyx":54 + /* "ssh/channel.pyx":61 * def get_exit_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -1773,7 +1886,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o #endif /*try:*/ { - /* "ssh/channel.pyx":55 + /* "ssh/channel.pyx":62 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_get_exit_status(self._channel) # <<<<<<<<<<<<<< @@ -1783,7 +1896,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o __pyx_v_rc = ssh_channel_get_exit_status(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":54 + /* "ssh/channel.pyx":61 * def get_exit_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -1802,7 +1915,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o } } - /* "ssh/channel.pyx":56 + /* "ssh/channel.pyx":63 * with nogil: * rc = c_ssh.ssh_channel_get_exit_status(self._channel) * return rc # <<<<<<<<<<<<<< @@ -1810,14 +1923,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o * def get_session(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":52 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":59 + * return handle_error_codes(rc, self._session._session) * * def get_exit_status(self): # <<<<<<<<<<<<<< * cdef int rc @@ -1835,7 +1948,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o return __pyx_r; } -/* "ssh/channel.pyx":58 +/* "ssh/channel.pyx":65 * return rc * * def get_session(self): # <<<<<<<<<<<<<< @@ -1860,9 +1973,13 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_9get_session(PyObject *__pyx_v_ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_session", 0); - /* "ssh/channel.pyx":59 + /* "ssh/channel.pyx":66 * * def get_session(self): * return self.session # <<<<<<<<<<<<<< @@ -1870,11 +1987,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3 * def is_closed(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->session)); - __pyx_r = ((PyObject *)__pyx_v_self->session); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":58 + /* "ssh/channel.pyx":65 * return rc * * def get_session(self): # <<<<<<<<<<<<<< @@ -1883,13 +2002,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3 */ /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ssh.channel.Channel.get_session", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "ssh/channel.pyx":61 +/* "ssh/channel.pyx":68 * return self.session * * def is_closed(self): # <<<<<<<<<<<<<< @@ -1921,7 +2044,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_closed", 0); - /* "ssh/channel.pyx":63 + /* "ssh/channel.pyx":70 * def is_closed(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -1936,7 +2059,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/channel.pyx":64 + /* "ssh/channel.pyx":71 * cdef bint rc * with nogil: * rc = c_ssh.ssh_channel_is_closed(self._channel) # <<<<<<<<<<<<<< @@ -1946,7 +2069,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s __pyx_v_rc = ssh_channel_is_closed(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":63 + /* "ssh/channel.pyx":70 * def is_closed(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -1965,7 +2088,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s } } - /* "ssh/channel.pyx":65 + /* "ssh/channel.pyx":72 * with nogil: * rc = c_ssh.ssh_channel_is_closed(self._channel) * return rc != 0 # <<<<<<<<<<<<<< @@ -1973,13 +2096,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s * def is_eof(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_rc != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_rc != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":61 + /* "ssh/channel.pyx":68 * return self.session * * def is_closed(self): # <<<<<<<<<<<<<< @@ -1998,7 +2121,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s return __pyx_r; } -/* "ssh/channel.pyx":67 +/* "ssh/channel.pyx":74 * return rc != 0 * * def is_eof(self): # <<<<<<<<<<<<<< @@ -2031,7 +2154,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_eof", 0); - /* "ssh/channel.pyx":69 + /* "ssh/channel.pyx":76 * def is_eof(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2046,7 +2169,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/channel.pyx":70 + /* "ssh/channel.pyx":77 * cdef bint rc * with nogil: * rc = c_ssh.ssh_channel_is_eof(self._channel) # <<<<<<<<<<<<<< @@ -2056,7 +2179,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ __pyx_v_rc = ssh_channel_is_eof(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":69 + /* "ssh/channel.pyx":76 * def is_eof(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2075,7 +2198,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ } } - /* "ssh/channel.pyx":71 + /* "ssh/channel.pyx":78 * with nogil: * rc = c_ssh.ssh_channel_is_eof(self._channel) * return bool(rc) # <<<<<<<<<<<<<< @@ -2084,13 +2207,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ */ __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, 71, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":67 + /* "ssh/channel.pyx":74 * return rc != 0 * * def is_eof(self): # <<<<<<<<<<<<<< @@ -2109,7 +2232,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/channel.pyx":73 +/* "ssh/channel.pyx":80 * return bool(rc) * * def is_open(self): # <<<<<<<<<<<<<< @@ -2142,7 +2265,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_open", 0); - /* "ssh/channel.pyx":75 + /* "ssh/channel.pyx":82 * def is_open(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2157,7 +2280,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh #endif /*try:*/ { - /* "ssh/channel.pyx":76 + /* "ssh/channel.pyx":83 * cdef bint rc * with nogil: * rc = c_ssh.ssh_channel_is_open(self._channel) # <<<<<<<<<<<<<< @@ -2167,7 +2290,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh __pyx_v_rc = ssh_channel_is_open(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":75 + /* "ssh/channel.pyx":82 * def is_open(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2186,7 +2309,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh } } - /* "ssh/channel.pyx":77 + /* "ssh/channel.pyx":84 * with nogil: * rc = c_ssh.ssh_channel_is_open(self._channel) * return bool(rc) # <<<<<<<<<<<<<< @@ -2195,13 +2318,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh */ __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, 77, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":73 + /* "ssh/channel.pyx":80 * return bool(rc) * * def is_open(self): # <<<<<<<<<<<<<< @@ -2220,7 +2343,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh return __pyx_r; } -/* "ssh/channel.pyx":79 +/* "ssh/channel.pyx":86 * return bool(rc) * * def send_eof(self): # <<<<<<<<<<<<<< @@ -2253,12 +2376,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_eof", 0); - /* "ssh/channel.pyx":81 + /* "ssh/channel.pyx":88 * def send_eof(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_send_eof(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -2268,22 +2391,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/channel.pyx":82 + /* "ssh/channel.pyx":89 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_send_eof(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_send_eof(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":81 + /* "ssh/channel.pyx":88 * def send_eof(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_send_eof(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -2297,22 +2420,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss } } - /* "ssh/channel.pyx":83 + /* "ssh/channel.pyx":90 * with nogil: * rc = c_ssh.ssh_channel_send_eof(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_auth_agent(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 83, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":79 + /* "ssh/channel.pyx":86 * return bool(rc) * * def send_eof(self): # <<<<<<<<<<<<<< @@ -2331,8 +2454,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/channel.pyx":85 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":92 + * return handle_error_codes(rc, self._session._session) * * def request_auth_agent(self): # <<<<<<<<<<<<<< * cdef int rc @@ -2364,12 +2487,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_auth_agent", 0); - /* "ssh/channel.pyx":87 + /* "ssh/channel.pyx":94 * def request_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_auth_agent(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -2379,22 +2502,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p #endif /*try:*/ { - /* "ssh/channel.pyx":88 + /* "ssh/channel.pyx":95 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_auth_agent(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_request_auth_agent(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":87 + /* "ssh/channel.pyx":94 * def request_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_auth_agent(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -2408,23 +2531,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p } } - /* "ssh/channel.pyx":89 + /* "ssh/channel.pyx":96 * with nogil: * rc = c_ssh.ssh_channel_request_auth_agent(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def open_auth_agent(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 89, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":85 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":92 + * return handle_error_codes(rc, self._session._session) * * def request_auth_agent(self): # <<<<<<<<<<<<<< * cdef int rc @@ -2442,8 +2565,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p return __pyx_r; } -/* "ssh/channel.pyx":91 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":98 + * return handle_error_codes(rc, self._session._session) * * def open_auth_agent(self): # <<<<<<<<<<<<<< * cdef int rc @@ -2475,12 +2598,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_auth_agent", 0); - /* "ssh/channel.pyx":93 + /* "ssh/channel.pyx":100 * def open_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_open_auth_agent(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -2490,22 +2613,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ #endif /*try:*/ { - /* "ssh/channel.pyx":94 + /* "ssh/channel.pyx":101 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_auth_agent(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_open_auth_agent(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":93 + /* "ssh/channel.pyx":100 * def open_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_open_auth_agent(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -2519,23 +2642,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ } } - /* "ssh/channel.pyx":95 + /* "ssh/channel.pyx":102 * with nogil: * rc = c_ssh.ssh_channel_open_auth_agent(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def open_forward(self, remotehost, int remoteport, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 95, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":91 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":98 + * return handle_error_codes(rc, self._session._session) * * def open_auth_agent(self): # <<<<<<<<<<<<<< * cdef int rc @@ -2553,8 +2676,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ return __pyx_r; } -/* "ssh/channel.pyx":97 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":104 + * return handle_error_codes(rc, self._session._session) * * def open_forward(self, remotehost, int remoteport, # <<<<<<<<<<<<<< * sourcehost, int sourceport): @@ -2602,23 +2725,23 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_23open_forward(PyObject *__pyx_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_remoteport)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 1); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 1); __PYX_ERR(0, 104, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourcehost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 2); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 2); __PYX_ERR(0, 104, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceport)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 3); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 3); __PYX_ERR(0, 104, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_forward") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_forward") < 0)) __PYX_ERR(0, 104, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -2629,13 +2752,13 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_23open_forward(PyObject *__pyx_ values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_remotehost = values[0]; - __pyx_v_remoteport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_remoteport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_v_remoteport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_remoteport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error) __pyx_v_sourcehost = values[2]; - __pyx_v_sourceport = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) + __pyx_v_sourceport = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 104, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.open_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2664,19 +2787,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_forward", 0); - /* "ssh/channel.pyx":99 + /* "ssh/channel.pyx":106 * def open_forward(self, remotehost, int remoteport, * sourcehost, int sourceport): * cdef bytes b_remotehost = to_bytes(remotehost) # <<<<<<<<<<<<<< * cdef const_char *c_remotehost = b_remotehost * cdef bytes b_sourcehost = to_bytes(sourcehost) */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_remotehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_remotehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_remotehost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":100 + /* "ssh/channel.pyx":107 * sourcehost, int sourceport): * cdef bytes b_remotehost = to_bytes(remotehost) * cdef const_char *c_remotehost = b_remotehost # <<<<<<<<<<<<<< @@ -2685,24 +2808,24 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj */ if (unlikely(__pyx_v_b_remotehost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 100, __pyx_L1_error) + __PYX_ERR(0, 107, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_remotehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_remotehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error) __pyx_v_c_remotehost = __pyx_t_2; - /* "ssh/channel.pyx":101 + /* "ssh/channel.pyx":108 * cdef bytes b_remotehost = to_bytes(remotehost) * cdef const_char *c_remotehost = b_remotehost * cdef bytes b_sourcehost = to_bytes(sourcehost) # <<<<<<<<<<<<<< * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sourcehost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":102 + /* "ssh/channel.pyx":109 * cdef const_char *c_remotehost = b_remotehost * cdef bytes b_sourcehost = to_bytes(sourcehost) * cdef const_char *c_sourcehost = b_sourcehost # <<<<<<<<<<<<<< @@ -2711,12 +2834,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj */ if (unlikely(__pyx_v_b_sourcehost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 102, __pyx_L1_error) + __PYX_ERR(0, 109, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L1_error) __pyx_v_c_sourcehost = __pyx_t_2; - /* "ssh/channel.pyx":104 + /* "ssh/channel.pyx":111 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2731,7 +2854,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":105 + /* "ssh/channel.pyx":112 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_forward( # <<<<<<<<<<<<<< @@ -2741,7 +2864,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj __pyx_v_rc = ssh_channel_open_forward(__pyx_v_self->_channel, __pyx_v_c_remotehost, __pyx_v_remoteport, __pyx_v_c_sourcehost, __pyx_v_sourceport); } - /* "ssh/channel.pyx":104 + /* "ssh/channel.pyx":111 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2760,23 +2883,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj } } - /* "ssh/channel.pyx":108 + /* "ssh/channel.pyx":115 * self._channel, c_remotehost, remoteport, * c_sourcehost, sourceport) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def open_session(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 108, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":97 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":104 + * return handle_error_codes(rc, self._session._session) * * def open_forward(self, remotehost, int remoteport, # <<<<<<<<<<<<<< * sourcehost, int sourceport): @@ -2796,8 +2919,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":110 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":117 + * return handle_error_codes(rc, self._session._session) * * def open_session(self): # <<<<<<<<<<<<<< * cdef int rc @@ -2829,12 +2952,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_session", 0); - /* "ssh/channel.pyx":112 + /* "ssh/channel.pyx":119 * def open_session(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_open_session(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -2844,22 +2967,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":113 + /* "ssh/channel.pyx":120 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_session(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_open_session(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":112 + /* "ssh/channel.pyx":119 * def open_session(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_open_session(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -2873,23 +2996,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj } } - /* "ssh/channel.pyx":114 + /* "ssh/channel.pyx":121 * with nogil: * rc = c_ssh.ssh_channel_open_session(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def open_x11(self, sourcehost, int sourceport): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":110 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":117 + * return handle_error_codes(rc, self._session._session) * * def open_session(self): # <<<<<<<<<<<<<< * cdef int rc @@ -2907,8 +3030,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":116 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":123 + * return handle_error_codes(rc, self._session._session) * * def open_x11(self, sourcehost, int sourceport): # <<<<<<<<<<<<<< * cdef bytes b_sourcehost = to_bytes(sourcehost) @@ -2950,11 +3073,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_27open_x11(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceport)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, 1); __PYX_ERR(0, 116, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, 1); __PYX_ERR(0, 123, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_x11") < 0)) __PYX_ERR(0, 116, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_x11") < 0)) __PYX_ERR(0, 123, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2963,11 +3086,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_27open_x11(PyObject *__pyx_v_se values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sourcehost = values[0]; - __pyx_v_sourceport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_v_sourceport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 116, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 123, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.open_x11", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2994,19 +3117,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_x11", 0); - /* "ssh/channel.pyx":117 + /* "ssh/channel.pyx":124 * * def open_x11(self, sourcehost, int sourceport): * cdef bytes b_sourcehost = to_bytes(sourcehost) # <<<<<<<<<<<<<< * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sourcehost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":118 + /* "ssh/channel.pyx":125 * def open_x11(self, sourcehost, int sourceport): * cdef bytes b_sourcehost = to_bytes(sourcehost) * cdef const_char *c_sourcehost = b_sourcehost # <<<<<<<<<<<<<< @@ -3015,12 +3138,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_sourcehost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 118, __pyx_L1_error) + __PYX_ERR(0, 125, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L1_error) __pyx_v_c_sourcehost = __pyx_t_2; - /* "ssh/channel.pyx":120 + /* "ssh/channel.pyx":127 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3035,17 +3158,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/channel.pyx":121 + /* "ssh/channel.pyx":128 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_x11( # <<<<<<<<<<<<<< * self._channel, c_sourcehost, sourceport) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_open_x11(__pyx_v_self->_channel, __pyx_v_c_sourcehost, __pyx_v_sourceport); } - /* "ssh/channel.pyx":120 + /* "ssh/channel.pyx":127 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3064,23 +3187,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss } } - /* "ssh/channel.pyx":123 + /* "ssh/channel.pyx":130 * rc = c_ssh.ssh_channel_open_x11( * self._channel, c_sourcehost, sourceport) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def accept_x11(self, int timeout_ms): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":116 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":123 + * return handle_error_codes(rc, self._session._session) * * def open_x11(self, sourcehost, int sourceport): # <<<<<<<<<<<<<< * cdef bytes b_sourcehost = to_bytes(sourcehost) @@ -3099,8 +3222,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/channel.pyx":125 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":132 + * return handle_error_codes(rc, self._session._session) * * def accept_x11(self, int timeout_ms): # <<<<<<<<<<<<<< * cdef Channel chan @@ -3119,7 +3242,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_29accept_x11(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("accept_x11 (wrapper)", 0); assert(__pyx_arg_timeout_ms); { - __pyx_v_timeout_ms = __Pyx_PyInt_As_int(__pyx_arg_timeout_ms); if (unlikely((__pyx_v_timeout_ms == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L3_error) + __pyx_v_timeout_ms = __Pyx_PyInt_As_int(__pyx_arg_timeout_ms); if (unlikely((__pyx_v_timeout_ms == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -3147,7 +3270,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("accept_x11", 0); - /* "ssh/channel.pyx":127 + /* "ssh/channel.pyx":134 * def accept_x11(self, int timeout_ms): * cdef Channel chan * cdef c_ssh.ssh_channel _chan = NULL # <<<<<<<<<<<<<< @@ -3156,7 +3279,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 */ __pyx_v__chan = NULL; - /* "ssh/channel.pyx":128 + /* "ssh/channel.pyx":135 * cdef Channel chan * cdef c_ssh.ssh_channel _chan = NULL * with nogil: # <<<<<<<<<<<<<< @@ -3171,7 +3294,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/channel.pyx":129 + /* "ssh/channel.pyx":136 * cdef c_ssh.ssh_channel _chan = NULL * with nogil: * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) # <<<<<<<<<<<<<< @@ -3181,7 +3304,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 __pyx_v__chan = ssh_channel_accept_x11(__pyx_v_self->_channel, __pyx_v_timeout_ms); } - /* "ssh/channel.pyx":128 + /* "ssh/channel.pyx":135 * cdef Channel chan * cdef c_ssh.ssh_channel _chan = NULL * with nogil: # <<<<<<<<<<<<<< @@ -3200,52 +3323,52 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 } } - /* "ssh/channel.pyx":130 + /* "ssh/channel.pyx":137 * with nogil: * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) * if _chan is NULL: # <<<<<<<<<<<<<< * raise MemoryError - * chan = Channel.from_ptr(_chan, self.session) + * chan = Channel.from_ptr(_chan, self._session) */ __pyx_t_1 = ((__pyx_v__chan == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/channel.pyx":131 + /* "ssh/channel.pyx":138 * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) * if _chan is NULL: * raise MemoryError # <<<<<<<<<<<<<< - * chan = Channel.from_ptr(_chan, self.session) + * chan = Channel.from_ptr(_chan, self._session) * return chan */ - PyErr_NoMemory(); __PYX_ERR(0, 131, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 138, __pyx_L1_error) - /* "ssh/channel.pyx":130 + /* "ssh/channel.pyx":137 * with nogil: * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) * if _chan is NULL: # <<<<<<<<<<<<<< * raise MemoryError - * chan = Channel.from_ptr(_chan, self.session) + * chan = Channel.from_ptr(_chan, self._session) */ } - /* "ssh/channel.pyx":132 + /* "ssh/channel.pyx":139 * if _chan is NULL: * raise MemoryError - * chan = Channel.from_ptr(_chan, self.session) # <<<<<<<<<<<<<< + * chan = Channel.from_ptr(_chan, self._session) # <<<<<<<<<<<<<< * return chan * */ - __pyx_t_2 = ((PyObject *)__pyx_v_self->session); + __pyx_t_2 = ((PyObject *)__pyx_v_self->_session); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_f_3ssh_7channel_7Channel_from_ptr(__pyx_v__chan, ((struct __pyx_obj_3ssh_7session_Session *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_3ssh_7channel_7Channel_from_ptr(__pyx_v__chan, ((struct __pyx_obj_3ssh_7session_Session *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chan = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/channel.pyx":133 + /* "ssh/channel.pyx":140 * raise MemoryError - * chan = Channel.from_ptr(_chan, self.session) + * chan = Channel.from_ptr(_chan, self._session) * return chan # <<<<<<<<<<<<<< * * def poll(self, bint is_stderr=False): @@ -3255,8 +3378,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 __pyx_r = ((PyObject *)__pyx_v_chan); goto __pyx_L0; - /* "ssh/channel.pyx":125 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":132 + * return handle_error_codes(rc, self._session._session) * * def accept_x11(self, int timeout_ms): # <<<<<<<<<<<<<< * cdef Channel chan @@ -3276,7 +3399,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/channel.pyx":135 +/* "ssh/channel.pyx":142 * return chan * * def poll(self, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3316,7 +3439,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_31poll(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll") < 0)) __PYX_ERR(0, 135, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll") < 0)) __PYX_ERR(0, 142, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3327,14 +3450,14 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_31poll(PyObject *__pyx_v_self, } } if (values[0]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L3_error) } else { __pyx_v_is_stderr = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("poll", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 135, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("poll", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 142, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.poll", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3358,12 +3481,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("poll", 0); - /* "ssh/channel.pyx":137 + /* "ssh/channel.pyx":144 * def poll(self, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -3373,22 +3496,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":138 + /* "ssh/channel.pyx":145 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_poll(__pyx_v_self->_channel, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":137 + /* "ssh/channel.pyx":144 * def poll(self, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -3402,22 +3525,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":139 + /* "ssh/channel.pyx":146 * with nogil: * rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def poll_timeout(self, int timeout, bint is_stderr=False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 139, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":135 + /* "ssh/channel.pyx":142 * return chan * * def poll(self, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3436,8 +3559,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c return __pyx_r; } -/* "ssh/channel.pyx":141 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":148 + * return handle_error_codes(rc, self._session._session) * * def poll_timeout(self, int timeout, bint is_stderr=False): # <<<<<<<<<<<<<< * cdef int rc @@ -3483,7 +3606,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_33poll_timeout(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll_timeout") < 0)) __PYX_ERR(0, 141, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll_timeout") < 0)) __PYX_ERR(0, 148, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3494,16 +3617,16 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_33poll_timeout(PyObject *__pyx_ default: goto __pyx_L5_argtuple_error; } } - __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error) if (values[1]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error) } else { __pyx_v_is_stderr = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("poll_timeout", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 141, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("poll_timeout", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.poll_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3527,7 +3650,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("poll_timeout", 0); - /* "ssh/channel.pyx":143 + /* "ssh/channel.pyx":150 * def poll_timeout(self, int timeout, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3542,17 +3665,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":144 + /* "ssh/channel.pyx":151 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_poll_timeout( # <<<<<<<<<<<<<< * self._channel, timeout, is_stderr) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_poll_timeout(__pyx_v_self->_channel, __pyx_v_timeout, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":143 + /* "ssh/channel.pyx":150 * def poll_timeout(self, int timeout, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3571,23 +3694,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":146 + /* "ssh/channel.pyx":153 * rc = c_ssh.ssh_channel_poll_timeout( * self._channel, timeout, is_stderr) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 146, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":141 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":148 + * return handle_error_codes(rc, self._session._session) * * def poll_timeout(self, int timeout, bint is_stderr=False): # <<<<<<<<<<<<<< * cdef int rc @@ -3605,8 +3728,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":148 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":155 + * return handle_error_codes(rc, self._session._session) * * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): # <<<<<<<<<<<<<< * cdef int rc @@ -3654,7 +3777,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_35read(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 148, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 155, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3667,19 +3790,19 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_35read(PyObject *__pyx_v_self, } } if (values[0]) { - __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L3_error) } else { __pyx_v_size = ((uint32_t)0x100000); } if (values[1]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L3_error) } else { __pyx_v_is_stderr = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 148, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 155, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3715,7 +3838,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); - /* "ssh/channel.pyx":150 + /* "ssh/channel.pyx":157 * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): * cdef int rc * cdef bytes buf = b'' # <<<<<<<<<<<<<< @@ -3725,7 +3848,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __Pyx_INCREF(__pyx_kp_b_); __pyx_v_buf = __pyx_kp_b_; - /* "ssh/channel.pyx":152 + /* "ssh/channel.pyx":159 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -3740,7 +3863,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":153 + /* "ssh/channel.pyx":160 * cdef char* cbuf * with nogil: * cbuf = malloc(sizeof(char)*size) # <<<<<<<<<<<<<< @@ -3749,7 +3872,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c */ __pyx_v_cbuf = ((char *)malloc(((sizeof(char)) * __pyx_v_size))); - /* "ssh/channel.pyx":154 + /* "ssh/channel.pyx":161 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -3759,7 +3882,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_t_1 = ((__pyx_v_cbuf == NULL) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":155 + /* "ssh/channel.pyx":162 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -3772,17 +3895,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":156 + /* "ssh/channel.pyx":163 * if cbuf is NULL: * with gil: * raise MemoryError # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: */ - PyErr_NoMemory(); __PYX_ERR(0, 156, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(0, 163, __pyx_L8_error) } - /* "ssh/channel.pyx":155 + /* "ssh/channel.pyx":162 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -3799,7 +3922,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":154 + /* "ssh/channel.pyx":161 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -3808,7 +3931,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c */ } - /* "ssh/channel.pyx":157 + /* "ssh/channel.pyx":164 * with gil: * raise MemoryError * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) # <<<<<<<<<<<<<< @@ -3818,7 +3941,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_v_rc = ssh_channel_read(__pyx_v_self->_channel, __pyx_v_cbuf, __pyx_v_size, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":152 + /* "ssh/channel.pyx":159 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -3844,7 +3967,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":158 + /* "ssh/channel.pyx":165 * raise MemoryError * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: # <<<<<<<<<<<<<< @@ -3853,7 +3976,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c */ /*try:*/ { - /* "ssh/channel.pyx":159 + /* "ssh/channel.pyx":166 * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -3863,19 +3986,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_t_1 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":160 + /* "ssh/channel.pyx":167 * try: * if rc > 0: * buf = cbuf[:rc] # <<<<<<<<<<<<<< * finally: * free(cbuf) */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L11_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh/channel.pyx":159 + /* "ssh/channel.pyx":166 * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -3885,11 +4008,11 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":162 + /* "ssh/channel.pyx":169 * buf = cbuf[:rc] * finally: * free(cbuf) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session), buf + * return handle_error_codes(rc, self._session._session), buf * */ /*finally:*/ { @@ -3932,18 +4055,18 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_L12:; } - /* "ssh/channel.pyx":163 + /* "ssh/channel.pyx":170 * finally: * free(cbuf) - * return handle_error_codes(rc, self.session._session), buf # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session), buf # <<<<<<<<<<<<<< * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 163, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); @@ -3955,8 +4078,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_t_12 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":148 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":155 + * return handle_error_codes(rc, self._session._session) * * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): # <<<<<<<<<<<<<< * cdef int rc @@ -3976,8 +4099,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c return __pyx_r; } -/* "ssh/channel.pyx":165 - * return handle_error_codes(rc, self.session._session), buf +/* "ssh/channel.pyx":172 + * return handle_error_codes(rc, self._session._session), buf * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, # <<<<<<<<<<<<<< * bint is_stderr=False): @@ -4025,7 +4148,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_nonblocking") < 0)) __PYX_ERR(0, 165, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_nonblocking") < 0)) __PYX_ERR(0, 172, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4038,15 +4161,15 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ } } if (values[0]) { - __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L3_error) } else { __pyx_v_size = ((uint32_t)0x100000); } if (values[1]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L3_error) } else { - /* "ssh/channel.pyx":166 + /* "ssh/channel.pyx":173 * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, * bint is_stderr=False): # <<<<<<<<<<<<<< @@ -4058,7 +4181,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_nonblocking", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 165, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_nonblocking", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 172, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.read_nonblocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4066,8 +4189,8 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_size, __pyx_v_is_stderr); - /* "ssh/channel.pyx":165 - * return handle_error_codes(rc, self.session._session), buf + /* "ssh/channel.pyx":172 + * return handle_error_codes(rc, self._session._session), buf * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, # <<<<<<<<<<<<<< * bint is_stderr=False): @@ -4102,7 +4225,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_nonblocking", 0); - /* "ssh/channel.pyx":168 + /* "ssh/channel.pyx":175 * bint is_stderr=False): * cdef int rc * cdef bytes buf = b'' # <<<<<<<<<<<<<< @@ -4112,7 +4235,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __Pyx_INCREF(__pyx_kp_b_); __pyx_v_buf = __pyx_kp_b_; - /* "ssh/channel.pyx":170 + /* "ssh/channel.pyx":177 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4127,7 +4250,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx #endif /*try:*/ { - /* "ssh/channel.pyx":171 + /* "ssh/channel.pyx":178 * cdef char* cbuf * with nogil: * cbuf = malloc(sizeof(char)*size) # <<<<<<<<<<<<<< @@ -4136,7 +4259,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx */ __pyx_v_cbuf = ((char *)malloc(((sizeof(char)) * __pyx_v_size))); - /* "ssh/channel.pyx":172 + /* "ssh/channel.pyx":179 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4146,7 +4269,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_t_1 = ((__pyx_v_cbuf == NULL) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":173 + /* "ssh/channel.pyx":180 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4159,17 +4282,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx #endif /*try:*/ { - /* "ssh/channel.pyx":174 + /* "ssh/channel.pyx":181 * if cbuf is NULL: * with gil: * raise MemoryError # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_read_nonblocking( * self._channel, cbuf, size, is_stderr) */ - PyErr_NoMemory(); __PYX_ERR(0, 174, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(0, 181, __pyx_L8_error) } - /* "ssh/channel.pyx":173 + /* "ssh/channel.pyx":180 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4186,7 +4309,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx } } - /* "ssh/channel.pyx":172 + /* "ssh/channel.pyx":179 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4195,7 +4318,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx */ } - /* "ssh/channel.pyx":175 + /* "ssh/channel.pyx":182 * with gil: * raise MemoryError * rc = c_ssh.ssh_channel_read_nonblocking( # <<<<<<<<<<<<<< @@ -4205,7 +4328,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_v_rc = ssh_channel_read_nonblocking(__pyx_v_self->_channel, __pyx_v_cbuf, __pyx_v_size, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":170 + /* "ssh/channel.pyx":177 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4231,7 +4354,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx } } - /* "ssh/channel.pyx":177 + /* "ssh/channel.pyx":184 * rc = c_ssh.ssh_channel_read_nonblocking( * self._channel, cbuf, size, is_stderr) * try: # <<<<<<<<<<<<<< @@ -4240,7 +4363,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx */ /*try:*/ { - /* "ssh/channel.pyx":178 + /* "ssh/channel.pyx":185 * self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4250,19 +4373,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_t_1 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":179 + /* "ssh/channel.pyx":186 * try: * if rc > 0: * buf = cbuf[:rc] # <<<<<<<<<<<<<< * finally: * free(cbuf) */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L11_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh/channel.pyx":178 + /* "ssh/channel.pyx":185 * self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4272,11 +4395,11 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx } } - /* "ssh/channel.pyx":181 + /* "ssh/channel.pyx":188 * buf = cbuf[:rc] * finally: * free(cbuf) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session), buf + * return handle_error_codes(rc, self._session._session), buf * */ /*finally:*/ { @@ -4319,18 +4442,18 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_L12:; } - /* "ssh/channel.pyx":182 + /* "ssh/channel.pyx":189 * finally: * free(cbuf) - * return handle_error_codes(rc, self.session._session), buf # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session), buf # <<<<<<<<<<<<<< * * def read_timeout(self, int timeout, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 182, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); @@ -4342,8 +4465,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_t_12 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":165 - * return handle_error_codes(rc, self.session._session), buf + /* "ssh/channel.pyx":172 + * return handle_error_codes(rc, self._session._session), buf * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, # <<<<<<<<<<<<<< * bint is_stderr=False): @@ -4363,8 +4486,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx return __pyx_r; } -/* "ssh/channel.pyx":184 - * return handle_error_codes(rc, self.session._session), buf +/* "ssh/channel.pyx":191 + * return handle_error_codes(rc, self._session._session), buf * * def read_timeout(self, int timeout, # <<<<<<<<<<<<<< * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): @@ -4419,7 +4542,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_timeout") < 0)) __PYX_ERR(0, 184, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_timeout") < 0)) __PYX_ERR(0, 191, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4432,17 +4555,17 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ default: goto __pyx_L5_argtuple_error; } } - __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L3_error) if (values[1]) { - __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L3_error) } else { __pyx_v_size = ((uint32_t)0x100000); } if (values[2]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L3_error) } else { - /* "ssh/channel.pyx":185 + /* "ssh/channel.pyx":192 * * def read_timeout(self, int timeout, * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -4454,7 +4577,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_timeout", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 184, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_timeout", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 191, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.read_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4462,8 +4585,8 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_3ssh_7channel_7Channel_38read_timeout(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_timeout, __pyx_v_size, __pyx_v_is_stderr); - /* "ssh/channel.pyx":184 - * return handle_error_codes(rc, self.session._session), buf + /* "ssh/channel.pyx":191 + * return handle_error_codes(rc, self._session._session), buf * * def read_timeout(self, int timeout, # <<<<<<<<<<<<<< * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): @@ -4498,7 +4621,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_timeout", 0); - /* "ssh/channel.pyx":187 + /* "ssh/channel.pyx":194 * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): * cdef int rc * cdef bytes buf = b'' # <<<<<<<<<<<<<< @@ -4508,7 +4631,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __Pyx_INCREF(__pyx_kp_b_); __pyx_v_buf = __pyx_kp_b_; - /* "ssh/channel.pyx":189 + /* "ssh/channel.pyx":196 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4523,7 +4646,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":190 + /* "ssh/channel.pyx":197 * cdef char* cbuf * with nogil: * cbuf = malloc(sizeof(char)*size) # <<<<<<<<<<<<<< @@ -4532,7 +4655,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj */ __pyx_v_cbuf = ((char *)malloc(((sizeof(char)) * __pyx_v_size))); - /* "ssh/channel.pyx":191 + /* "ssh/channel.pyx":198 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4542,7 +4665,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_t_1 = ((__pyx_v_cbuf == NULL) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":192 + /* "ssh/channel.pyx":199 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4555,17 +4678,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":193 + /* "ssh/channel.pyx":200 * if cbuf is NULL: * with gil: * raise MemoryError # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_read_timeout( * self._channel, cbuf, size, is_stderr, timeout) */ - PyErr_NoMemory(); __PYX_ERR(0, 193, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(0, 200, __pyx_L8_error) } - /* "ssh/channel.pyx":192 + /* "ssh/channel.pyx":199 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4582,7 +4705,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":191 + /* "ssh/channel.pyx":198 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4591,7 +4714,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj */ } - /* "ssh/channel.pyx":194 + /* "ssh/channel.pyx":201 * with gil: * raise MemoryError * rc = c_ssh.ssh_channel_read_timeout( # <<<<<<<<<<<<<< @@ -4601,7 +4724,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_v_rc = ssh_channel_read_timeout(__pyx_v_self->_channel, __pyx_v_cbuf, __pyx_v_size, __pyx_v_is_stderr, __pyx_v_timeout); } - /* "ssh/channel.pyx":189 + /* "ssh/channel.pyx":196 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4627,7 +4750,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":196 + /* "ssh/channel.pyx":203 * rc = c_ssh.ssh_channel_read_timeout( * self._channel, cbuf, size, is_stderr, timeout) * try: # <<<<<<<<<<<<<< @@ -4636,7 +4759,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj */ /*try:*/ { - /* "ssh/channel.pyx":197 + /* "ssh/channel.pyx":204 * self._channel, cbuf, size, is_stderr, timeout) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4646,19 +4769,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_t_1 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":198 + /* "ssh/channel.pyx":205 * try: * if rc > 0: * buf = cbuf[:rc] # <<<<<<<<<<<<<< * finally: * free(cbuf) */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L11_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh/channel.pyx":197 + /* "ssh/channel.pyx":204 * self._channel, cbuf, size, is_stderr, timeout) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4668,11 +4791,11 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":200 + /* "ssh/channel.pyx":207 * buf = cbuf[:rc] * finally: * free(cbuf) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session), buf + * return handle_error_codes(rc, self._session._session), buf * */ /*finally:*/ { @@ -4715,18 +4838,18 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_L12:; } - /* "ssh/channel.pyx":201 + /* "ssh/channel.pyx":208 * finally: * free(cbuf) - * return handle_error_codes(rc, self.session._session), buf # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session), buf # <<<<<<<<<<<<<< * * def request_env(self, name, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 201, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); @@ -4738,8 +4861,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_t_12 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":184 - * return handle_error_codes(rc, self.session._session), buf + /* "ssh/channel.pyx":191 + * return handle_error_codes(rc, self._session._session), buf * * def read_timeout(self, int timeout, # <<<<<<<<<<<<<< * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): @@ -4759,8 +4882,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":203 - * return handle_error_codes(rc, self.session._session), buf +/* "ssh/channel.pyx":210 + * return handle_error_codes(rc, self._session._session), buf * * def request_env(self, name, value): # <<<<<<<<<<<<<< * cdef bytes b_name = to_bytes(name) @@ -4802,11 +4925,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_41request_env(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, 1); __PYX_ERR(0, 203, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, 1); __PYX_ERR(0, 210, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_env") < 0)) __PYX_ERR(0, 203, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_env") < 0)) __PYX_ERR(0, 210, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4819,7 +4942,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_41request_env(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 203, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 210, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.request_env", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4848,19 +4971,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_env", 0); - /* "ssh/channel.pyx":204 + /* "ssh/channel.pyx":211 * * def request_env(self, name, value): * cdef bytes b_name = to_bytes(name) # <<<<<<<<<<<<<< * cdef const_char *c_name = b_name * cdef bytes b_value = to_bytes(value) */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":205 + /* "ssh/channel.pyx":212 * def request_env(self, name, value): * cdef bytes b_name = to_bytes(name) * cdef const_char *c_name = b_name # <<<<<<<<<<<<<< @@ -4869,24 +4992,24 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_name == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 205, __pyx_L1_error) + __PYX_ERR(0, 212, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) __pyx_v_c_name = __pyx_t_2; - /* "ssh/channel.pyx":206 + /* "ssh/channel.pyx":213 * cdef bytes b_name = to_bytes(name) * cdef const_char *c_name = b_name * cdef bytes b_value = to_bytes(value) # <<<<<<<<<<<<<< * cdef const_char *c_value = b_value * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":207 + /* "ssh/channel.pyx":214 * cdef const_char *c_name = b_name * cdef bytes b_value = to_bytes(value) * cdef const_char *c_value = b_value # <<<<<<<<<<<<<< @@ -4895,17 +5018,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 207, __pyx_L1_error) + __PYX_ERR(0, 214, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/channel.pyx":209 + /* "ssh/channel.pyx":216 * cdef const_char *c_value = b_value * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -4915,22 +5038,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":210 + /* "ssh/channel.pyx":217 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_request_env(__pyx_v_self->_channel, __pyx_v_c_name, __pyx_v_c_value); } - /* "ssh/channel.pyx":209 + /* "ssh/channel.pyx":216 * cdef const_char *c_value = b_value * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -4944,23 +5067,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ } } - /* "ssh/channel.pyx":211 + /* "ssh/channel.pyx":218 * with nogil: * rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_exec(self, cmd): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 211, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":203 - * return handle_error_codes(rc, self.session._session), buf + /* "ssh/channel.pyx":210 + * return handle_error_codes(rc, self._session._session), buf * * def request_env(self, name, value): # <<<<<<<<<<<<<< * cdef bytes b_name = to_bytes(name) @@ -4980,8 +5103,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":213 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":220 + * return handle_error_codes(rc, self._session._session) * * def request_exec(self, cmd): # <<<<<<<<<<<<<< * cdef bytes b_cmd = to_bytes(cmd) @@ -5016,19 +5139,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_exec", 0); - /* "ssh/channel.pyx":214 + /* "ssh/channel.pyx":221 * * def request_exec(self, cmd): * cdef bytes b_cmd = to_bytes(cmd) # <<<<<<<<<<<<<< * cdef const_char *c_cmd = b_cmd * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_cmd = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":215 + /* "ssh/channel.pyx":222 * def request_exec(self, cmd): * cdef bytes b_cmd = to_bytes(cmd) * cdef const_char *c_cmd = b_cmd # <<<<<<<<<<<<<< @@ -5037,17 +5160,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj */ if (unlikely(__pyx_v_b_cmd == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 215, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_cmd); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_cmd); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L1_error) __pyx_v_c_cmd = __pyx_t_2; - /* "ssh/channel.pyx":217 + /* "ssh/channel.pyx":224 * cdef const_char *c_cmd = b_cmd * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -5057,22 +5180,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":218 + /* "ssh/channel.pyx":225 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_request_exec(__pyx_v_self->_channel, __pyx_v_c_cmd); } - /* "ssh/channel.pyx":217 + /* "ssh/channel.pyx":224 * cdef const_char *c_cmd = b_cmd * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -5086,23 +5209,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj } } - /* "ssh/channel.pyx":219 + /* "ssh/channel.pyx":226 * with nogil: * rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_pty(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":213 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":220 + * return handle_error_codes(rc, self._session._session) * * def request_exec(self, cmd): # <<<<<<<<<<<<<< * cdef bytes b_cmd = to_bytes(cmd) @@ -5121,8 +5244,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":221 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":228 + * return handle_error_codes(rc, self._session._session) * * def request_pty(self): # <<<<<<<<<<<<<< * cdef int rc @@ -5154,12 +5277,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_pty", 0); - /* "ssh/channel.pyx":223 + /* "ssh/channel.pyx":230 * def request_pty(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_pty(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -5169,22 +5292,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":224 + /* "ssh/channel.pyx":231 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_pty(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_request_pty(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":223 + /* "ssh/channel.pyx":230 * def request_pty(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_pty(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -5198,23 +5321,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ } } - /* "ssh/channel.pyx":225 + /* "ssh/channel.pyx":232 * with nogil: * rc = c_ssh.ssh_channel_request_pty(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def change_pty_size(self, int cols, int rows): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":221 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":228 + * return handle_error_codes(rc, self._session._session) * * def request_pty(self): # <<<<<<<<<<<<<< * cdef int rc @@ -5232,8 +5355,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":227 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":234 + * return handle_error_codes(rc, self._session._session) * * def change_pty_size(self, int cols, int rows): # <<<<<<<<<<<<<< * cdef int rc @@ -5275,11 +5398,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_47change_pty_size(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rows)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, 1); __PYX_ERR(0, 227, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, 1); __PYX_ERR(0, 234, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_pty_size") < 0)) __PYX_ERR(0, 227, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_pty_size") < 0)) __PYX_ERR(0, 234, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5287,12 +5410,12 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_47change_pty_size(PyObject *__p values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_cols = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_cols == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error) - __pyx_v_rows = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error) + __pyx_v_cols = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_cols == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error) + __pyx_v_rows = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 227, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 234, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.change_pty_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5316,12 +5439,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_pty_size", 0); - /* "ssh/channel.pyx":229 + /* "ssh/channel.pyx":236 * def change_pty_size(self, int cols, int rows): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -5331,22 +5454,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ #endif /*try:*/ { - /* "ssh/channel.pyx":230 + /* "ssh/channel.pyx":237 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_change_pty_size(__pyx_v_self->_channel, __pyx_v_cols, __pyx_v_rows); } - /* "ssh/channel.pyx":229 + /* "ssh/channel.pyx":236 * def change_pty_size(self, int cols, int rows): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -5360,23 +5483,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ } } - /* "ssh/channel.pyx":231 + /* "ssh/channel.pyx":238 * with nogil: * rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_pty_size(self, terminal, int col, int row): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 231, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":227 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":234 + * return handle_error_codes(rc, self._session._session) * * def change_pty_size(self, int cols, int rows): # <<<<<<<<<<<<<< * cdef int rc @@ -5394,8 +5517,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ return __pyx_r; } -/* "ssh/channel.pyx":233 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":240 + * return handle_error_codes(rc, self._session._session) * * def request_pty_size(self, terminal, int col, int row): # <<<<<<<<<<<<<< * cdef bytes b_terminal = to_bytes(terminal) @@ -5440,17 +5563,17 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_49request_pty_size(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_col)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 1); __PYX_ERR(0, 233, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 1); __PYX_ERR(0, 240, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 2); __PYX_ERR(0, 233, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 2); __PYX_ERR(0, 240, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_pty_size") < 0)) __PYX_ERR(0, 233, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_pty_size") < 0)) __PYX_ERR(0, 240, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -5460,12 +5583,12 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_49request_pty_size(PyObject *__ values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_terminal = values[0]; - __pyx_v_col = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_col == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L3_error) - __pyx_v_row = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L3_error) + __pyx_v_col = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_col == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L3_error) + __pyx_v_row = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 233, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.request_pty_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5492,19 +5615,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_pty_size", 0); - /* "ssh/channel.pyx":234 + /* "ssh/channel.pyx":241 * * def request_pty_size(self, terminal, int col, int row): * cdef bytes b_terminal = to_bytes(terminal) # <<<<<<<<<<<<<< * cdef const_char *c_terminal = b_terminal * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_terminal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_terminal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_terminal = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":235 + /* "ssh/channel.pyx":242 * def request_pty_size(self, terminal, int col, int row): * cdef bytes b_terminal = to_bytes(terminal) * cdef const_char *c_terminal = b_terminal # <<<<<<<<<<<<<< @@ -5513,12 +5636,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx */ if (unlikely(__pyx_v_b_terminal == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 235, __pyx_L1_error) + __PYX_ERR(0, 242, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_terminal); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_terminal); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L1_error) __pyx_v_c_terminal = __pyx_t_2; - /* "ssh/channel.pyx":237 + /* "ssh/channel.pyx":244 * cdef const_char *c_terminal = b_terminal * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5533,17 +5656,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx #endif /*try:*/ { - /* "ssh/channel.pyx":238 + /* "ssh/channel.pyx":245 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_pty_size( # <<<<<<<<<<<<<< * self._channel, c_terminal, col, row) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_request_pty_size(__pyx_v_self->_channel, __pyx_v_c_terminal, __pyx_v_col, __pyx_v_row); } - /* "ssh/channel.pyx":237 + /* "ssh/channel.pyx":244 * cdef const_char *c_terminal = b_terminal * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5562,23 +5685,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx } } - /* "ssh/channel.pyx":240 + /* "ssh/channel.pyx":247 * rc = c_ssh.ssh_channel_request_pty_size( * self._channel, c_terminal, col, row) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_send_signal(self, sig): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 240, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":233 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":240 + * return handle_error_codes(rc, self._session._session) * * def request_pty_size(self, terminal, int col, int row): # <<<<<<<<<<<<<< * cdef bytes b_terminal = to_bytes(terminal) @@ -5597,8 +5720,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx return __pyx_r; } -/* "ssh/channel.pyx":242 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":249 + * return handle_error_codes(rc, self._session._session) * * def request_send_signal(self, sig): # <<<<<<<<<<<<<< * cdef bytes b_sig = to_bytes(sig) @@ -5633,19 +5756,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_send_signal", 0); - /* "ssh/channel.pyx":243 + /* "ssh/channel.pyx":250 * * def request_send_signal(self, sig): * cdef bytes b_sig = to_bytes(sig) # <<<<<<<<<<<<<< * cdef const_char *c_sig = b_sig * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":244 + /* "ssh/channel.pyx":251 * def request_send_signal(self, sig): * cdef bytes b_sig = to_bytes(sig) * cdef const_char *c_sig = b_sig # <<<<<<<<<<<<<< @@ -5654,12 +5777,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ */ if (unlikely(__pyx_v_b_sig == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 244, __pyx_L1_error) + __PYX_ERR(0, 251, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sig); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sig); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L1_error) __pyx_v_c_sig = __pyx_t_2; - /* "ssh/channel.pyx":246 + /* "ssh/channel.pyx":253 * cdef const_char *c_sig = b_sig * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5674,17 +5797,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ #endif /*try:*/ { - /* "ssh/channel.pyx":247 + /* "ssh/channel.pyx":254 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_send_signal( # <<<<<<<<<<<<<< * self._channel, c_sig) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_request_send_signal(__pyx_v_self->_channel, __pyx_v_c_sig); } - /* "ssh/channel.pyx":246 + /* "ssh/channel.pyx":253 * cdef const_char *c_sig = b_sig * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5703,23 +5826,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ } } - /* "ssh/channel.pyx":249 + /* "ssh/channel.pyx":256 * rc = c_ssh.ssh_channel_request_send_signal( * self._channel, c_sig) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_send_break(self, c_ssh.uint32_t length): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 249, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":242 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":249 + * return handle_error_codes(rc, self._session._session) * * def request_send_signal(self, sig): # <<<<<<<<<<<<<< * cdef bytes b_sig = to_bytes(sig) @@ -5738,8 +5861,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ return __pyx_r; } -/* "ssh/channel.pyx":251 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":258 + * return handle_error_codes(rc, self._session._session) * * def request_send_break(self, c_ssh.uint32_t length): # <<<<<<<<<<<<<< * cdef int rc @@ -5758,7 +5881,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_53request_send_break(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("request_send_break (wrapper)", 0); assert(__pyx_arg_length); { - __pyx_v_length = __Pyx_PyInt_As_uint32_t(__pyx_arg_length); if (unlikely((__pyx_v_length == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L3_error) + __pyx_v_length = __Pyx_PyInt_As_uint32_t(__pyx_arg_length); if (unlikely((__pyx_v_length == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5784,7 +5907,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_send_break", 0); - /* "ssh/channel.pyx":253 + /* "ssh/channel.pyx":260 * def request_send_break(self, c_ssh.uint32_t length): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5799,17 +5922,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p #endif /*try:*/ { - /* "ssh/channel.pyx":254 + /* "ssh/channel.pyx":261 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_send_break( # <<<<<<<<<<<<<< * self._channel, length) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_request_send_break(__pyx_v_self->_channel, __pyx_v_length); } - /* "ssh/channel.pyx":253 + /* "ssh/channel.pyx":260 * def request_send_break(self, c_ssh.uint32_t length): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5828,23 +5951,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p } } - /* "ssh/channel.pyx":256 + /* "ssh/channel.pyx":263 * rc = c_ssh.ssh_channel_request_send_break( * self._channel, length) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_shell(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 256, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_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/channel.pyx":251 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":258 + * return handle_error_codes(rc, self._session._session) * * def request_send_break(self, c_ssh.uint32_t length): # <<<<<<<<<<<<<< * cdef int rc @@ -5862,8 +5985,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p return __pyx_r; } -/* "ssh/channel.pyx":258 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":265 + * return handle_error_codes(rc, self._session._session) * * def request_shell(self): # <<<<<<<<<<<<<< * cdef int rc @@ -5895,12 +6018,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_shell", 0); - /* "ssh/channel.pyx":260 + /* "ssh/channel.pyx":267 * def request_shell(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_shell(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -5910,22 +6033,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob #endif /*try:*/ { - /* "ssh/channel.pyx":261 + /* "ssh/channel.pyx":268 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_shell(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_request_shell(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":260 + /* "ssh/channel.pyx":267 * def request_shell(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_shell(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -5939,23 +6062,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob } } - /* "ssh/channel.pyx":262 + /* "ssh/channel.pyx":269 * with nogil: * rc = c_ssh.ssh_channel_request_shell(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_sftp(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 262, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":258 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":265 + * return handle_error_codes(rc, self._session._session) * * def request_shell(self): # <<<<<<<<<<<<<< * cdef int rc @@ -5973,8 +6096,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob return __pyx_r; } -/* "ssh/channel.pyx":264 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":271 + * return handle_error_codes(rc, self._session._session) * * def request_sftp(self): # <<<<<<<<<<<<<< * cdef int rc @@ -6006,12 +6129,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_sftp", 0); - /* "ssh/channel.pyx":266 + /* "ssh/channel.pyx":273 * def request_sftp(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_sftp(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -6021,22 +6144,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":267 + /* "ssh/channel.pyx":274 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_sftp(self._channel) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_request_sftp(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":266 + /* "ssh/channel.pyx":273 * def request_sftp(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_request_sftp(self._channel) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -6050,23 +6173,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj } } - /* "ssh/channel.pyx":268 + /* "ssh/channel.pyx":275 * with nogil: * rc = c_ssh.ssh_channel_request_sftp(self._channel) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_subsystem(self, subsystem): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 268, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":264 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":271 + * return handle_error_codes(rc, self._session._session) * * def request_sftp(self): # <<<<<<<<<<<<<< * cdef int rc @@ -6084,8 +6207,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":270 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":277 + * return handle_error_codes(rc, self._session._session) * * def request_subsystem(self, subsystem): # <<<<<<<<<<<<<< * cdef bytes b_sys = to_bytes(subsystem) @@ -6120,19 +6243,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_subsystem", 0); - /* "ssh/channel.pyx":271 + /* "ssh/channel.pyx":278 * * def request_subsystem(self, subsystem): * cdef bytes b_sys = to_bytes(subsystem) # <<<<<<<<<<<<<< * cdef const_char *c_sys = b_sys * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_subsystem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_subsystem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sys = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":272 + /* "ssh/channel.pyx":279 * def request_subsystem(self, subsystem): * cdef bytes b_sys = to_bytes(subsystem) * cdef const_char *c_sys = b_sys # <<<<<<<<<<<<<< @@ -6141,12 +6264,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py */ if (unlikely(__pyx_v_b_sys == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 272, __pyx_L1_error) + __PYX_ERR(0, 279, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sys); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sys); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) __pyx_v_c_sys = __pyx_t_2; - /* "ssh/channel.pyx":274 + /* "ssh/channel.pyx":281 * cdef const_char *c_sys = b_sys * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6161,17 +6284,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py #endif /*try:*/ { - /* "ssh/channel.pyx":275 + /* "ssh/channel.pyx":282 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_subsystem( # <<<<<<<<<<<<<< * self._channel, c_sys) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_request_subsystem(__pyx_v_self->_channel, __pyx_v_c_sys); } - /* "ssh/channel.pyx":274 + /* "ssh/channel.pyx":281 * cdef const_char *c_sys = b_sys * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6190,23 +6313,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py } } - /* "ssh/channel.pyx":277 + /* "ssh/channel.pyx":284 * rc = c_ssh.ssh_channel_request_subsystem( * self._channel, c_sys) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def request_x11(self, int screen_number, bint single_connection=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":270 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":277 + * return handle_error_codes(rc, self._session._session) * * def request_subsystem(self, subsystem): # <<<<<<<<<<<<<< * cdef bytes b_sys = to_bytes(subsystem) @@ -6225,8 +6348,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py return __pyx_r; } -/* "ssh/channel.pyx":279 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":286 + * return handle_error_codes(rc, self._session._session) * * def request_x11(self, int screen_number, bint single_connection=True): # <<<<<<<<<<<<<< * cdef int rc @@ -6272,7 +6395,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_61request_x11(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_x11") < 0)) __PYX_ERR(0, 279, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_x11") < 0)) __PYX_ERR(0, 286, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -6283,16 +6406,16 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_61request_x11(PyObject *__pyx_v default: goto __pyx_L5_argtuple_error; } } - __pyx_v_screen_number = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_v_screen_number = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L3_error) if (values[1]) { - __pyx_v_single_connection = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_single_connection == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_v_single_connection = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_single_connection == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L3_error) } else { __pyx_v_single_connection = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("request_x11", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 279, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_x11", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 286, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.request_x11", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6316,7 +6439,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_x11", 0); - /* "ssh/channel.pyx":281 + /* "ssh/channel.pyx":288 * def request_x11(self, int screen_number, bint single_connection=True): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6331,17 +6454,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":282 + /* "ssh/channel.pyx":289 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_x11( # <<<<<<<<<<<<<< * self._channel, single_connection, NULL, NULL, screen_number) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ __pyx_v_rc = ssh_channel_request_x11(__pyx_v_self->_channel, __pyx_v_single_connection, NULL, NULL, __pyx_v_screen_number); } - /* "ssh/channel.pyx":281 + /* "ssh/channel.pyx":288 * def request_x11(self, int screen_number, bint single_connection=True): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6360,23 +6483,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ } } - /* "ssh/channel.pyx":284 + /* "ssh/channel.pyx":291 * rc = c_ssh.ssh_channel_request_x11( * self._channel, single_connection, NULL, NULL, screen_number) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def set_blocking(self, bint blocking): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 284, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":279 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":286 + * return handle_error_codes(rc, self._session._session) * * def request_x11(self, int screen_number, bint single_connection=True): # <<<<<<<<<<<<<< * cdef int rc @@ -6394,8 +6517,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":286 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":293 + * return handle_error_codes(rc, self._session._session) * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< * with nogil: @@ -6414,7 +6537,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_63set_blocking(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking (wrapper)", 0); assert(__pyx_arg_blocking); { - __pyx_v_blocking = __Pyx_PyObject_IsTrue(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L3_error) + __pyx_v_blocking = __Pyx_PyObject_IsTrue(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6434,7 +6557,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/channel.pyx":287 + /* "ssh/channel.pyx":294 * * def set_blocking(self, bint blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6449,7 +6572,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":288 + /* "ssh/channel.pyx":295 * def set_blocking(self, bint blocking): * with nogil: * c_ssh.ssh_channel_set_blocking(self._channel, blocking) # <<<<<<<<<<<<<< @@ -6459,7 +6582,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj ssh_channel_set_blocking(__pyx_v_self->_channel, __pyx_v_blocking); } - /* "ssh/channel.pyx":287 + /* "ssh/channel.pyx":294 * * def set_blocking(self, bint blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6478,8 +6601,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj } } - /* "ssh/channel.pyx":286 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":293 + * return handle_error_codes(rc, self._session._session) * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< * with nogil: @@ -6493,7 +6616,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":290 +/* "ssh/channel.pyx":297 * c_ssh.ssh_channel_set_blocking(self._channel, blocking) * * def set_counter(self, counter): # <<<<<<<<<<<<<< @@ -6523,7 +6646,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_64set_counter(CYTHON_UNUSED str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counter", 0); - /* "ssh/channel.pyx":291 + /* "ssh/channel.pyx":298 * * def set_counter(self, counter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6531,9 +6654,9 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_64set_counter(CYTHON_UNUSED str * def write(self, bytes data): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 291, __pyx_L1_error) + __PYX_ERR(0, 298, __pyx_L1_error) - /* "ssh/channel.pyx":290 + /* "ssh/channel.pyx":297 * c_ssh.ssh_channel_set_blocking(self._channel, blocking) * * def set_counter(self, counter): # <<<<<<<<<<<<<< @@ -6550,7 +6673,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_64set_counter(CYTHON_UNUSED str return __pyx_r; } -/* "ssh/channel.pyx":293 +/* "ssh/channel.pyx":300 * raise NotImplementedError * * def write(self, bytes data): # <<<<<<<<<<<<<< @@ -6568,7 +6691,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_67write(PyObject *__pyx_v_self, PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 293, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 300, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7channel_7Channel_66write(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6595,7 +6718,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 0); - /* "ssh/channel.pyx":294 + /* "ssh/channel.pyx":301 * * def write(self, bytes data): * cdef c_ssh.uint32_t size = len(data) # <<<<<<<<<<<<<< @@ -6604,12 +6727,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 294, __pyx_L1_error) + __PYX_ERR(0, 301, __pyx_L1_error) } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 301, __pyx_L1_error) __pyx_v_size = __pyx_t_1; - /* "ssh/channel.pyx":295 + /* "ssh/channel.pyx":302 * def write(self, bytes data): * cdef c_ssh.uint32_t size = len(data) * cdef const_char *c_data = data # <<<<<<<<<<<<<< @@ -6618,17 +6741,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 295, __pyx_L1_error) + __PYX_ERR(0, 302, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_v_c_data = __pyx_t_2; - /* "ssh/channel.pyx":297 + /* "ssh/channel.pyx":304 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_write(self._channel, c_data, size) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -6638,22 +6761,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 #endif /*try:*/ { - /* "ssh/channel.pyx":298 + /* "ssh/channel.pyx":305 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_write(self._channel, c_data, size) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_write(__pyx_v_self->_channel, __pyx_v_c_data, __pyx_v_size); } - /* "ssh/channel.pyx":297 + /* "ssh/channel.pyx":304 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_write(self._channel, c_data, size) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -6667,22 +6790,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 } } - /* "ssh/channel.pyx":299 + /* "ssh/channel.pyx":306 * with nogil: * rc = c_ssh.ssh_channel_write(self._channel, c_data, size) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def write_stderr(self, bytes data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 299, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":293 + /* "ssh/channel.pyx":300 * raise NotImplementedError * * def write(self, bytes data): # <<<<<<<<<<<<<< @@ -6701,8 +6824,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 return __pyx_r; } -/* "ssh/channel.pyx":301 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":308 + * return handle_error_codes(rc, self._session._session) * * def write_stderr(self, bytes data): # <<<<<<<<<<<<<< * cdef c_ssh.uint32_t size = len(data) @@ -6719,7 +6842,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_69write_stderr(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_stderr (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 301, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 308, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7channel_7Channel_68write_stderr(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6746,7 +6869,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_stderr", 0); - /* "ssh/channel.pyx":302 + /* "ssh/channel.pyx":309 * * def write_stderr(self, bytes data): * cdef c_ssh.uint32_t size = len(data) # <<<<<<<<<<<<<< @@ -6755,12 +6878,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 302, __pyx_L1_error) + __PYX_ERR(0, 309, __pyx_L1_error) } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 309, __pyx_L1_error) __pyx_v_size = __pyx_t_1; - /* "ssh/channel.pyx":303 + /* "ssh/channel.pyx":310 * def write_stderr(self, bytes data): * cdef c_ssh.uint32_t size = len(data) * cdef const_char *c_data = data # <<<<<<<<<<<<<< @@ -6769,17 +6892,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 303, __pyx_L1_error) + __PYX_ERR(0, 310, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error) __pyx_v_c_data = __pyx_t_2; - /* "ssh/channel.pyx":305 + /* "ssh/channel.pyx":312 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ { #ifdef WITH_THREAD @@ -6789,22 +6912,22 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":306 + /* "ssh/channel.pyx":313 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) * */ __pyx_v_rc = ssh_channel_write_stderr(__pyx_v_self->_channel, __pyx_v_c_data, __pyx_v_size); } - /* "ssh/channel.pyx":305 + /* "ssh/channel.pyx":312 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) - * return handle_error_codes(rc, self.session._session) + * return handle_error_codes(rc, self._session._session) */ /*finally:*/ { /*normal exit:*/{ @@ -6818,23 +6941,23 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj } } - /* "ssh/channel.pyx":307 + /* "ssh/channel.pyx":314 * with nogil: * rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) - * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< + * return handle_error_codes(rc, self._session._session) # <<<<<<<<<<<<<< * * def window_size(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 307, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":301 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":308 + * return handle_error_codes(rc, self._session._session) * * def write_stderr(self, bytes data): # <<<<<<<<<<<<<< * cdef c_ssh.uint32_t size = len(data) @@ -6852,8 +6975,8 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":309 - * return handle_error_codes(rc, self.session._session) +/* "ssh/channel.pyx":316 + * return handle_error_codes(rc, self._session._session) * * def window_size(self): # <<<<<<<<<<<<<< * cdef c_ssh.uint32_t size @@ -6884,7 +7007,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("window_size", 0); - /* "ssh/channel.pyx":311 + /* "ssh/channel.pyx":318 * def window_size(self): * cdef c_ssh.uint32_t size * with nogil: # <<<<<<<<<<<<<< @@ -6899,7 +7022,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":312 + /* "ssh/channel.pyx":319 * cdef c_ssh.uint32_t size * with nogil: * size = c_ssh.ssh_channel_window_size(self._channel) # <<<<<<<<<<<<<< @@ -6909,7 +7032,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ __pyx_v_size = ssh_channel_window_size(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":311 + /* "ssh/channel.pyx":318 * def window_size(self): * cdef c_ssh.uint32_t size * with nogil: # <<<<<<<<<<<<<< @@ -6928,7 +7051,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ } } - /* "ssh/channel.pyx":313 + /* "ssh/channel.pyx":320 * with nogil: * size = c_ssh.ssh_channel_window_size(self._channel) * return size # <<<<<<<<<<<<<< @@ -6936,14 +7059,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ * def select(self, channels not None, outchannels not None, maxfd, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":309 - * return handle_error_codes(rc, self.session._session) + /* "ssh/channel.pyx":316 + * return handle_error_codes(rc, self._session._session) * * def window_size(self): # <<<<<<<<<<<<<< * cdef c_ssh.uint32_t size @@ -6961,7 +7084,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":315 +/* "ssh/channel.pyx":322 * return size * * def select(self, channels not None, outchannels not None, maxfd, # <<<<<<<<<<<<<< @@ -6988,7 +7111,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channels,&__pyx_n_s_outchannels,&__pyx_n_s_maxfd,&__pyx_n_s_readfds,&__pyx_n_s_timeout,0}; PyObject* values[5] = {0,0,0,0,0}; - /* "ssh/channel.pyx":316 + /* "ssh/channel.pyx":323 * * def select(self, channels not None, outchannels not None, maxfd, * readfds, timeout=None): # <<<<<<<<<<<<<< @@ -7021,19 +7144,19 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outchannels)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 1); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 1); __PYX_ERR(0, 322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxfd)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 2); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 2); __PYX_ERR(0, 322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_readfds)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 3); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 3); __PYX_ERR(0, 322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -7043,7 +7166,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "select") < 0)) __PYX_ERR(0, 315, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "select") < 0)) __PYX_ERR(0, 322, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -7065,21 +7188,21 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 322, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.select", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_channels) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "channels"); __PYX_ERR(0, 315, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "channels"); __PYX_ERR(0, 322, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_outchannels) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "outchannels"); __PYX_ERR(0, 315, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "outchannels"); __PYX_ERR(0, 322, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7channel_7Channel_72select(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_channels, __pyx_v_outchannels, __pyx_v_maxfd, __pyx_v_readfds, __pyx_v_timeout); - /* "ssh/channel.pyx":315 + /* "ssh/channel.pyx":322 * return size * * def select(self, channels not None, outchannels not None, maxfd, # <<<<<<<<<<<<<< @@ -7104,15 +7227,15 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_72select(CYTHON_UNUSED struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("select", 0); - /* "ssh/channel.pyx":317 + /* "ssh/channel.pyx":324 * def select(self, channels not None, outchannels not None, maxfd, * readfds, timeout=None): * raise NotImplementedError # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 317, __pyx_L1_error) + __PYX_ERR(0, 324, __pyx_L1_error) - /* "ssh/channel.pyx":315 + /* "ssh/channel.pyx":322 * return size * * def select(self, channels not None, outchannels not None, maxfd, # <<<<<<<<<<<<<< @@ -7129,46 +7252,9 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_72select(CYTHON_UNUSED struct _ return __pyx_r; } -/* "ssh/channel.pxd":24 - * cdef class Channel: - * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session # <<<<<<<<<<<<<< - * cdef readonly bint closed - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_3ssh_7channel_7Channel_7session_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_3ssh_7channel_7Channel_7session_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_3ssh_7channel_7Channel_7session___get__(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_3ssh_7channel_7Channel_7session___get__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->session)); - __pyx_r = ((PyObject *)__pyx_v_self->session); - goto __pyx_L0; - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - /* "ssh/channel.pxd":25 * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session + * cdef Session _session * cdef readonly bint closed # <<<<<<<<<<<<<< * * @staticmethod @@ -7329,7 +7415,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_76__setstate_cython__(CYTHON_UN } static struct __pyx_vtabstruct_3ssh_7channel_Channel __pyx_vtable_3ssh_7channel_Channel; -static PyObject *__pyx_tp_new_3ssh_7channel_Channel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_3ssh_7channel_Channel(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_3ssh_7channel_Channel *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { @@ -7340,8 +7426,8 @@ static PyObject *__pyx_tp_new_3ssh_7channel_Channel(PyTypeObject *t, CYTHON_UNUS if (unlikely(!o)) return 0; p = ((struct __pyx_obj_3ssh_7channel_Channel *)o); p->__pyx_vtab = __pyx_vtabptr_3ssh_7channel_Channel; - p->session = ((struct __pyx_obj_3ssh_7session_Session *)Py_None); Py_INCREF(Py_None); - if (unlikely(__pyx_pw_3ssh_7channel_7Channel_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + p->_session = ((struct __pyx_obj_3ssh_7session_Session *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_3ssh_7channel_7Channel_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; @@ -7364,15 +7450,15 @@ static void __pyx_tp_dealloc_3ssh_7channel_Channel(PyObject *o) { __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } - Py_CLEAR(p->session); + Py_CLEAR(p->_session); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_3ssh_7channel_Channel(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ssh_7channel_Channel *p = (struct __pyx_obj_3ssh_7channel_Channel *)o; - if (p->session) { - e = (*v)(((PyObject *)p->session), a); if (e) return e; + if (p->_session) { + e = (*v)(((PyObject *)p->_session), a); if (e) return e; } return 0; } @@ -7380,8 +7466,8 @@ static int __pyx_tp_traverse_3ssh_7channel_Channel(PyObject *o, visitproc v, voi static int __pyx_tp_clear_3ssh_7channel_Channel(PyObject *o) { PyObject* tmp; struct __pyx_obj_3ssh_7channel_Channel *p = (struct __pyx_obj_3ssh_7channel_Channel *)o; - tmp = ((PyObject*)p->session); - p->session = ((struct __pyx_obj_3ssh_7session_Session *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->_session); + p->_session = ((struct __pyx_obj_3ssh_7session_Session *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } @@ -7436,7 +7522,7 @@ static PyMethodDef __pyx_methods_3ssh_7channel_Channel[] = { }; static struct PyGetSetDef __pyx_getsets_3ssh_7channel_Channel[] = { - {(char *)"session", __pyx_getprop_3ssh_7channel_7Channel_session, 0, (char *)0, 0}, + {(char *)"session", __pyx_getprop_3ssh_7channel_7Channel_session, 0, (char *)"Originating session.", 0}, {(char *)"closed", __pyx_getprop_3ssh_7channel_7Channel_closed, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; @@ -7583,6 +7669,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1}, {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1}, {&__pyx_n_s_screen_number, __pyx_k_screen_number, sizeof(__pyx_k_screen_number), 0, 0, 1, 1}, + {&__pyx_n_s_session, __pyx_k_session, sizeof(__pyx_k_session), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_single_connection, __pyx_k_single_connection, sizeof(__pyx_k_single_connection), 0, 0, 1, 1}, @@ -7596,8 +7683,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 131, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 298, __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:; @@ -7682,16 +7769,16 @@ static int __Pyx_modinit_type_init_code(void) { /*--- Type init code ---*/ __pyx_vtabptr_3ssh_7channel_Channel = &__pyx_vtable_3ssh_7channel_Channel; __pyx_vtable_3ssh_7channel_Channel.from_ptr = (struct __pyx_obj_3ssh_7channel_Channel *(*)(ssh_channel, struct __pyx_obj_3ssh_7session_Session *))__pyx_f_3ssh_7channel_7Channel_from_ptr; - if (PyType_Ready(&__pyx_type_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 27, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_3ssh_7channel_Channel.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3ssh_7channel_Channel.tp_dictoffset && __pyx_type_3ssh_7channel_Channel.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_3ssh_7channel_Channel.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_3ssh_7channel_Channel.tp_dict, __pyx_vtabptr_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 25, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Channel, (PyObject *)&__pyx_type_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 25, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_3ssh_7channel_Channel.tp_dict, __pyx_vtabptr_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Channel, (PyObject *)&__pyx_type_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3ssh_7channel_Channel) < 0) __PYX_ERR(0, 27, __pyx_L1_error) __pyx_ptype_3ssh_7channel_Channel = &__pyx_type_3ssh_7channel_Channel; __Pyx_RefNannyFinishContext(); return 0; @@ -8033,72 +8120,6 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { return result; } -/* RaiseArgTupleInvalid */ -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *more_or_less; - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; - } else { - num_expected = num_max; - more_or_less = "at most"; - } - if (exact) { - more_or_less = "exactly"; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); -} - -/* KeywordStringCheck */ -static int __Pyx_CheckKeywordStrings( - PyObject *kwdict, - const char* function_name, - int kw_allowed) -{ - PyObject* key = 0; - Py_ssize_t pos = 0; -#if CYTHON_COMPILING_IN_PYPY - if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) - goto invalid_keyword; - return 1; -#else - while (PyDict_Next(kwdict, &pos, &key, 0)) { - #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_Check(key))) - #endif - if (unlikely(!PyUnicode_Check(key))) - goto invalid_keyword_type; - } - if ((!kw_allowed) && unlikely(key)) - goto invalid_keyword; - return 1; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - return 0; -#endif -invalid_keyword: - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif - return 0; -} - /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, @@ -8215,6 +8236,53 @@ static int __Pyx_ParseOptionalKeywords( return -1; } +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { @@ -8563,27 +8631,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } #endif -/* ArgTypeTest */ -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) -{ - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - else if (exact) { - #if PY_MAJOR_VERSION == 2 - if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; - #endif - } - else { - if (likely(__Pyx_TypeCheck(obj, type))) return 1; - } - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); - return 0; -} - /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { diff --git a/ssh/channel.pxd b/ssh/channel.pxd index 02e286fd..a034cebe 100644 --- a/ssh/channel.pxd +++ b/ssh/channel.pxd @@ -21,7 +21,7 @@ cimport c_ssh cdef class Channel: cdef c_ssh.ssh_channel _channel - cdef readonly Session session + cdef Session _session cdef readonly bint closed @staticmethod diff --git a/ssh/channel.pyx b/ssh/channel.pyx index 85e4014b..cc0d6a0b 100644 --- a/ssh/channel.pyx +++ b/ssh/channel.pyx @@ -17,26 +17,33 @@ from libc.stdlib cimport malloc, free from libc.string cimport const_char +from session cimport Session from utils cimport to_bytes, to_str, handle_error_codes + cimport c_ssh cdef class Channel: - def __cinit__(self): + def __cinit__(self, Session session): self.closed = False + self._session = session def __dealloc__(self): - if self._channel is not NULL: + if self._channel is not NULL and self._session is not None: c_ssh.ssh_channel_free(self._channel) self._channel = NULL + @property + def session(self): + """Originating session.""" + return self._session + @staticmethod cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): - cdef Channel chan = Channel.__new__(Channel) + cdef Channel chan = Channel.__new__(Channel, session) chan._channel = _chan - chan.session = session return chan def close(self): @@ -47,7 +54,7 @@ cdef class Channel: rc = c_ssh.ssh_channel_close(self._channel) if rc == 0: self.closed = True - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def get_exit_status(self): cdef int rc @@ -80,19 +87,19 @@ cdef class Channel: cdef int rc with nogil: rc = c_ssh.ssh_channel_send_eof(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_auth_agent(self): cdef int rc with nogil: rc = c_ssh.ssh_channel_request_auth_agent(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def open_auth_agent(self): cdef int rc with nogil: rc = c_ssh.ssh_channel_open_auth_agent(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def open_forward(self, remotehost, int remoteport, sourcehost, int sourceport): @@ -105,13 +112,13 @@ cdef class Channel: rc = c_ssh.ssh_channel_open_forward( self._channel, c_remotehost, remoteport, c_sourcehost, sourceport) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def open_session(self): cdef int rc with nogil: rc = c_ssh.ssh_channel_open_session(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def open_x11(self, sourcehost, int sourceport): cdef bytes b_sourcehost = to_bytes(sourcehost) @@ -120,7 +127,7 @@ cdef class Channel: with nogil: rc = c_ssh.ssh_channel_open_x11( self._channel, c_sourcehost, sourceport) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def accept_x11(self, int timeout_ms): cdef Channel chan @@ -129,21 +136,21 @@ cdef class Channel: _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) if _chan is NULL: raise MemoryError - chan = Channel.from_ptr(_chan, self.session) + chan = Channel.from_ptr(_chan, self._session) return chan def poll(self, bint is_stderr=False): cdef int rc with nogil: rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def poll_timeout(self, int timeout, bint is_stderr=False): cdef int rc with nogil: rc = c_ssh.ssh_channel_poll_timeout( self._channel, timeout, is_stderr) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): cdef int rc @@ -160,7 +167,7 @@ cdef class Channel: buf = cbuf[:rc] finally: free(cbuf) - return handle_error_codes(rc, self.session._session), buf + return handle_error_codes(rc, self._session._session), buf def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): @@ -179,7 +186,7 @@ cdef class Channel: buf = cbuf[:rc] finally: free(cbuf) - return handle_error_codes(rc, self.session._session), buf + return handle_error_codes(rc, self._session._session), buf def read_timeout(self, int timeout, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): @@ -198,7 +205,7 @@ cdef class Channel: buf = cbuf[:rc] finally: free(cbuf) - return handle_error_codes(rc, self.session._session), buf + return handle_error_codes(rc, self._session._session), buf def request_env(self, name, value): cdef bytes b_name = to_bytes(name) @@ -208,7 +215,7 @@ cdef class Channel: cdef int rc with nogil: rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_exec(self, cmd): cdef bytes b_cmd = to_bytes(cmd) @@ -216,19 +223,19 @@ cdef class Channel: cdef int rc with nogil: rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_pty(self): cdef int rc with nogil: rc = c_ssh.ssh_channel_request_pty(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def change_pty_size(self, int cols, int rows): cdef int rc with nogil: rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_pty_size(self, terminal, int col, int row): cdef bytes b_terminal = to_bytes(terminal) @@ -237,7 +244,7 @@ cdef class Channel: with nogil: rc = c_ssh.ssh_channel_request_pty_size( self._channel, c_terminal, col, row) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_send_signal(self, sig): cdef bytes b_sig = to_bytes(sig) @@ -246,26 +253,26 @@ cdef class Channel: with nogil: rc = c_ssh.ssh_channel_request_send_signal( self._channel, c_sig) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_send_break(self, c_ssh.uint32_t length): cdef int rc with nogil: rc = c_ssh.ssh_channel_request_send_break( self._channel, length) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_shell(self): cdef int rc with nogil: rc = c_ssh.ssh_channel_request_shell(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_sftp(self): cdef int rc with nogil: rc = c_ssh.ssh_channel_request_sftp(self._channel) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_subsystem(self, subsystem): cdef bytes b_sys = to_bytes(subsystem) @@ -274,14 +281,14 @@ cdef class Channel: with nogil: rc = c_ssh.ssh_channel_request_subsystem( self._channel, c_sys) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def request_x11(self, int screen_number, bint single_connection=True): cdef int rc with nogil: rc = c_ssh.ssh_channel_request_x11( self._channel, single_connection, NULL, NULL, screen_number) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def set_blocking(self, bint blocking): with nogil: @@ -296,7 +303,7 @@ cdef class Channel: cdef int rc with nogil: rc = c_ssh.ssh_channel_write(self._channel, c_data, size) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def write_stderr(self, bytes data): cdef c_ssh.uint32_t size = len(data) @@ -304,7 +311,7 @@ cdef class Channel: cdef int rc with nogil: rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) - return handle_error_codes(rc, self.session._session) + return handle_error_codes(rc, self._session._session) def window_size(self): cdef c_ssh.uint32_t size diff --git a/ssh/session.c b/ssh/session.c index b91e71dd..f527f6db 100644 --- a/ssh/session.c +++ b/ssh/session.c @@ -862,13 +862,13 @@ struct __pyx_obj_3ssh_7session_Session; * * cdef class Channel: # <<<<<<<<<<<<<< * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session + * cdef Session _session */ struct __pyx_obj_3ssh_7channel_Channel { PyObject_HEAD struct __pyx_vtabstruct_3ssh_7channel_Channel *__pyx_vtab; ssh_channel _channel; - struct __pyx_obj_3ssh_7session_Session *session; + struct __pyx_obj_3ssh_7session_Session *_session; int closed; }; @@ -982,7 +982,7 @@ struct __pyx_obj_3ssh_7session_Session { * * cdef class Channel: # <<<<<<<<<<<<<< * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session + * cdef Session _session */ struct __pyx_vtabstruct_3ssh_7channel_Channel { @@ -2113,13 +2113,35 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD # <<<<<<<<<<<<<< * cdef int rc - * with nogil: + * self.sock = socket */ __pyx_v_fd = SSH_OPTIONS_FD; /* "ssh/session.pyx":80 * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD * cdef int rc + * self.sock = socket # <<<<<<<<<<<<<< + * self._sock = _sock + * with nogil: + */ + __Pyx_INCREF(__pyx_v_socket); + __Pyx_GIVEREF(__pyx_v_socket); + __Pyx_GOTREF(__pyx_v_self->sock); + __Pyx_DECREF(__pyx_v_self->sock); + __pyx_v_self->sock = __pyx_v_socket; + + /* "ssh/session.pyx":81 + * cdef int rc + * self.sock = socket + * self._sock = _sock # <<<<<<<<<<<<<< + * with nogil: + * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) + */ + __pyx_v_self->_sock = __pyx_v__sock; + + /* "ssh/session.pyx":82 + * self.sock = socket + * self._sock = _sock * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) * handle_error_codes(rc, self._session) @@ -2132,19 +2154,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":81 - * cdef int rc + /* "ssh/session.pyx":83 + * self._sock = _sock * with nogil: * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) # <<<<<<<<<<<<<< * handle_error_codes(rc, self._session) - * self._sock = _sock + * return rc */ __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, __pyx_v_fd, (&__pyx_v__sock)); } - /* "ssh/session.pyx":80 - * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD - * cdef int rc + /* "ssh/session.pyx":82 + * self.sock = socket + * self._sock = _sock * with nogil: # <<<<<<<<<<<<<< * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) * handle_error_codes(rc, self._session) @@ -2161,40 +2183,18 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s } } - /* "ssh/session.pyx":82 + /* "ssh/session.pyx":84 * with nogil: * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) * handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< - * self._sock = _sock - * self.sock = socket - */ - __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, 82, __pyx_L1_error) - - /* "ssh/session.pyx":83 - * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) - * handle_error_codes(rc, self._session) - * self._sock = _sock # <<<<<<<<<<<<<< - * self.sock = socket - * return rc - */ - __pyx_v_self->_sock = __pyx_v__sock; - - /* "ssh/session.pyx":84 - * handle_error_codes(rc, self._session) - * self._sock = _sock - * self.sock = socket # <<<<<<<<<<<<<< * return rc * */ - __Pyx_INCREF(__pyx_v_socket); - __Pyx_GIVEREF(__pyx_v_socket); - __Pyx_GOTREF(__pyx_v_self->sock); - __Pyx_DECREF(__pyx_v_self->sock); - __pyx_v_self->sock = __pyx_v_socket; + __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, 84, __pyx_L1_error) /* "ssh/session.pyx":85 - * self._sock = _sock - * self.sock = socket + * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) + * handle_error_codes(rc, self._session) * return rc # <<<<<<<<<<<<<< * * def blocking_flush(self, int timeout): @@ -2404,7 +2404,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _channel = c_ssh.ssh_channel_new(self._session) - * if _channel is NULL: + * if _channel 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, 97, __pyx_L4_error) @@ -2412,97 +2412,10 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) # <<<<<<<<<<<<<< - * if _channel is NULL: - * with gil: + * if _channel is NULL: + * return handle_error_codes( */ __pyx_v__channel = ssh_channel_new(__pyx_v_self->_session); - - /* "ssh/session.pyx":99 - * _check_connected(self._session) - * _channel = c_ssh.ssh_channel_new(self._session) - * if _channel is NULL: # <<<<<<<<<<<<<< - * with gil: - * return handle_error_codes( - */ - __pyx_t_1 = ((__pyx_v__channel == NULL) != 0); - if (__pyx_t_1) { - - /* "ssh/session.pyx":100 - * _channel = c_ssh.ssh_channel_new(self._session) - * if _channel is NULL: - * with gil: # <<<<<<<<<<<<<< - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) - */ - { - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - /*try:*/ { - - /* "ssh/session.pyx":101 - * if _channel is NULL: - * with gil: - * 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":102 - * with gil: - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< - * 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, 101, __pyx_L8_error) - - /* "ssh/session.pyx":101 - * if _channel is NULL: - * with gil: - * 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, 101, __pyx_L8_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L7_return; - } - - /* "ssh/session.pyx":100 - * _channel = c_ssh.ssh_channel_new(self._session) - * if _channel is NULL: - * with gil: # <<<<<<<<<<<<<< - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) - */ - /*finally:*/ { - __pyx_L7_return: { - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - goto __pyx_L3_return; - } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - goto __pyx_L4_error; - } - } - } - - /* "ssh/session.pyx":99 - * _check_connected(self._session) - * _channel = c_ssh.ssh_channel_new(self._session) - * if _channel is NULL: # <<<<<<<<<<<<<< - * with gil: - * return handle_error_codes( - */ - } } /* "ssh/session.pyx":96 @@ -2520,13 +2433,6 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 #endif goto __pyx_L5; } - __pyx_L3_return: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L0; - } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); @@ -2538,20 +2444,70 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 } } - /* "ssh/session.pyx":103 - * return handle_error_codes( - * c_ssh.ssh_get_error_code(self._session), self._session) + /* "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) + */ + __pyx_t_1 = ((__pyx_v__channel == NULL) != 0); + if (__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) # <<<<<<<<<<<<<< + * 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; + + /* "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) + */ + } + + /* "ssh/session.pyx":102 + * return handle_error_codes( + * c_ssh.ssh_get_error_code(self._session), self._session) * 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, 103, __pyx_L1_error) + __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; - /* "ssh/session.pyx":104 - * c_ssh.ssh_get_error_code(self._session), self._session) + /* "ssh/session.pyx":103 + * c_ssh.ssh_get_error_code(self._session), self._session) * channel = Channel.from_ptr(_channel, self) * return channel # <<<<<<<<<<<<<< * @@ -2582,7 +2538,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":106 +/* "ssh/session.pyx":105 * return channel * * def sftp_new(self): # <<<<<<<<<<<<<< @@ -2617,7 +2573,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":109 + /* "ssh/session.pyx":108 * cdef sftp_session _sftp * cdef SFTP sftp * with nogil: # <<<<<<<<<<<<<< @@ -2632,16 +2588,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":110 + /* "ssh/session.pyx":109 * 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, 110, __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, 109, __pyx_L4_error) - /* "ssh/session.pyx":111 + /* "ssh/session.pyx":110 * with nogil: * _check_connected(self._session) * _sftp = sftp_new(self._session) # <<<<<<<<<<<<<< @@ -2651,7 +2607,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":109 + /* "ssh/session.pyx":108 * cdef sftp_session _sftp * cdef SFTP sftp * with nogil: # <<<<<<<<<<<<<< @@ -2677,7 +2633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":112 + /* "ssh/session.pyx":111 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2687,7 +2643,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":113 + /* "ssh/session.pyx":112 * _sftp = sftp_new(self._session) * if _sftp is NULL: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2696,29 +2652,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":114 + /* "ssh/session.pyx":113 * 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, 113, __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, 112, __pyx_L1_error) - /* "ssh/session.pyx":113 + /* "ssh/session.pyx":112 * _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, 113, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":112 + /* "ssh/session.pyx":111 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2727,19 +2683,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":115 + /* "ssh/session.pyx":114 * 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, 115, __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, 114, __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":116 + /* "ssh/session.pyx":115 * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) * return sftp # <<<<<<<<<<<<<< @@ -2751,7 +2707,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":106 + /* "ssh/session.pyx":105 * return channel * * def sftp_new(self): # <<<<<<<<<<<<<< @@ -2771,7 +2727,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/session.pyx":118 +/* "ssh/session.pyx":117 * return sftp * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -2807,7 +2763,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":126 + /* "ssh/session.pyx":125 * cdef SFTP sftp * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2822,16 +2778,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":127 + /* "ssh/session.pyx":126 * 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, 127, __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, 126, __pyx_L4_error) - /* "ssh/session.pyx":128 + /* "ssh/session.pyx":127 * with nogil: * _check_connected(self._session) * _sftp = sftp_new(self._session) # <<<<<<<<<<<<<< @@ -2840,7 +2796,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":129 + /* "ssh/session.pyx":128 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2850,7 +2806,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":130 + /* "ssh/session.pyx":129 * _sftp = sftp_new(self._session) * if _sftp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2863,7 +2819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":131 + /* "ssh/session.pyx":130 * if _sftp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2872,30 +2828,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":132 + /* "ssh/session.pyx":131 * 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, 131, __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, 130, __pyx_L8_error) - /* "ssh/session.pyx":131 + /* "ssh/session.pyx":130 * 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, 131, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":130 + /* "ssh/session.pyx":129 * _sftp = sftp_new(self._session) * if _sftp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2918,7 +2874,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s } } - /* "ssh/session.pyx":129 + /* "ssh/session.pyx":128 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2927,7 +2883,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ } - /* "ssh/session.pyx":133 + /* "ssh/session.pyx":132 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) # <<<<<<<<<<<<<< @@ -2937,7 +2893,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":126 + /* "ssh/session.pyx":125 * cdef SFTP sftp * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2970,28 +2926,28 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s } } - /* "ssh/session.pyx":134 + /* "ssh/session.pyx":133 * 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, 134, __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, 133, __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":135 + /* "ssh/session.pyx":134 * 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, 135, __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, 134, __pyx_L1_error) - /* "ssh/session.pyx":136 + /* "ssh/session.pyx":135 * sftp = SFTP.from_ptr(_sftp, self) * handle_error_codes(rc, self._session) * return sftp # <<<<<<<<<<<<<< @@ -3003,7 +2959,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":118 + /* "ssh/session.pyx":117 * return sftp * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -3023,7 +2979,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s return __pyx_r; } -/* "ssh/session.pyx":138 +/* "ssh/session.pyx":137 * return sftp * * def connect(self): # <<<<<<<<<<<<<< @@ -3056,7 +3012,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 0); - /* "ssh/session.pyx":140 + /* "ssh/session.pyx":139 * def connect(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3071,7 +3027,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh #endif /*try:*/ { - /* "ssh/session.pyx":141 + /* "ssh/session.pyx":140 * cdef int rc * with nogil: * rc = c_ssh.ssh_connect(self._session) # <<<<<<<<<<<<<< @@ -3081,7 +3037,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":140 + /* "ssh/session.pyx":139 * def connect(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3100,7 +3056,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh } } - /* "ssh/session.pyx":142 + /* "ssh/session.pyx":141 * with nogil: * rc = c_ssh.ssh_connect(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3108,14 +3064,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, 142, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __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, 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_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":138 + /* "ssh/session.pyx":137 * return sftp * * def connect(self): # <<<<<<<<<<<<<< @@ -3134,7 +3090,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh return __pyx_r; } -/* "ssh/session.pyx":144 +/* "ssh/session.pyx":143 * return handle_error_codes(rc, self._session) * * def disconnect(self): # <<<<<<<<<<<<<< @@ -3168,7 +3124,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED stru return __pyx_r; } -/* "ssh/session.pyx":155 +/* "ssh/session.pyx":154 * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< @@ -3201,7 +3157,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":157 + /* "ssh/session.pyx":156 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3216,7 +3172,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":157 * cdef c_ssh.ssh_connector _connector * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) # <<<<<<<<<<<<<< @@ -3226,7 +3182,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":157 + /* "ssh/session.pyx":156 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3245,7 +3201,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob } } - /* "ssh/session.pyx":159 + /* "ssh/session.pyx":158 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3255,7 +3211,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":160 + /* "ssh/session.pyx":159 * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: * return # <<<<<<<<<<<<<< @@ -3266,7 +3222,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":159 + /* "ssh/session.pyx":158 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3275,7 +3231,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob */ } - /* "ssh/session.pyx":161 + /* "ssh/session.pyx":160 * if _connector is NULL: * return * return Connector.from_ptr(_connector, self) # <<<<<<<<<<<<<< @@ -3283,13 +3239,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, 161, __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, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":155 + /* "ssh/session.pyx":154 * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< @@ -3308,7 +3264,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":163 +/* "ssh/session.pyx":162 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3351,11 +3307,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, 163, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, 1); __PYX_ERR(0, 162, __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, 163, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "accept_forward") < 0)) __PYX_ERR(0, 162, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3363,12 +3319,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, 163, __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, 163, __pyx_L3_error) + __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) } 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, 163, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 162, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.accept_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3392,7 +3348,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":165 + /* "ssh/session.pyx":164 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3407,16 +3363,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":166 + /* "ssh/session.pyx":165 * 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, 166, __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, 165, __pyx_L4_error) - /* "ssh/session.pyx":167 + /* "ssh/session.pyx":166 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_accept_forward( # <<<<<<<<<<<<<< @@ -3426,7 +3382,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":165 + /* "ssh/session.pyx":164 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3452,7 +3408,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o } } - /* "ssh/session.pyx":169 + /* "ssh/session.pyx":168 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3462,7 +3418,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":170 + /* "ssh/session.pyx":169 * self._session, timeout, &dest_port) * if _channel is NULL: * return # <<<<<<<<<<<<<< @@ -3473,7 +3429,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":169 + /* "ssh/session.pyx":168 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3482,7 +3438,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o */ } - /* "ssh/session.pyx":171 + /* "ssh/session.pyx":170 * if _channel is NULL: * return * return Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< @@ -3490,13 +3446,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, 171, __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, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":163 + /* "ssh/session.pyx":162 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3515,7 +3471,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":173 +/* "ssh/session.pyx":172 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3558,11 +3514,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, 173, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, 1); __PYX_ERR(0, 172, __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, 173, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_forward") < 0)) __PYX_ERR(0, 172, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3571,18 +3527,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, 173, __pyx_L3_error) + __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) } 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, 173, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 172, __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, 173, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 172, __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); @@ -3609,19 +3565,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":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 * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":175 + /* "ssh/session.pyx":174 * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3630,12 +3586,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, 175, __pyx_L1_error) + __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, 175, __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_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":177 + /* "ssh/session.pyx":176 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3650,7 +3606,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":178 + /* "ssh/session.pyx":177 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_cancel_forward( # <<<<<<<<<<<<<< @@ -3660,7 +3616,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":177 + /* "ssh/session.pyx":176 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3679,7 +3635,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o } } - /* "ssh/session.pyx":180 + /* "ssh/session.pyx":179 * rc = c_ssh.ssh_channel_cancel_forward( * self._session, c_address, port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3687,14 +3643,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, 180, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":173 + /* "ssh/session.pyx":172 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3714,7 +3670,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":182 +/* "ssh/session.pyx":181 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3760,17 +3716,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, 182, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 1); __PYX_ERR(0, 181, __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, 182, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 2); __PYX_ERR(0, 181, __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, 182, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "listen_forward") < 0)) __PYX_ERR(0, 181, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3780,19 +3736,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, 182, __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, 182, __pyx_L3_error) + __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) } 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, 182, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 181, __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, 182, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 181, __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); @@ -3819,19 +3775,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":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 * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":184 + /* "ssh/session.pyx":183 * 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 # <<<<<<<<<<<<<< @@ -3840,12 +3796,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, 184, __pyx_L1_error) + __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, 184, __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_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":186 + /* "ssh/session.pyx":185 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3860,7 +3816,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":187 + /* "ssh/session.pyx":186 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_listen_forward( # <<<<<<<<<<<<<< @@ -3870,7 +3826,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":186 + /* "ssh/session.pyx":185 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3889,7 +3845,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o } } - /* "ssh/session.pyx":189 + /* "ssh/session.pyx":188 * rc = c_ssh.ssh_channel_listen_forward( * self._session, c_address, port, &bound_port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3897,14 +3853,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, 189, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":182 + /* "ssh/session.pyx":181 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3924,7 +3880,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":191 +/* "ssh/session.pyx":190 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -3958,7 +3914,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":194 + /* "ssh/session.pyx":193 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -3973,16 +3929,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct #endif /*try:*/ { - /* "ssh/session.pyx":195 + /* "ssh/session.pyx":194 * 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, 195, __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, 194, __pyx_L4_error) - /* "ssh/session.pyx":196 + /* "ssh/session.pyx":195 * with nogil: * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) # <<<<<<<<<<<<<< @@ -3992,7 +3948,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":194 + /* "ssh/session.pyx":193 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -4018,19 +3974,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct } } - /* "ssh/session.pyx":197 + /* "ssh/session.pyx":196 * _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, 197, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_message = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":198 + /* "ssh/session.pyx":197 * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message * return b_message # <<<<<<<<<<<<<< @@ -4042,7 +3998,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct __pyx_r = __pyx_v_b_message; goto __pyx_L0; - /* "ssh/session.pyx":191 + /* "ssh/session.pyx":190 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -4062,7 +4018,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct return __pyx_r; } -/* "ssh/session.pyx":200 +/* "ssh/session.pyx":199 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4094,7 +4050,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":202 + /* "ssh/session.pyx":201 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4109,7 +4065,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/session.pyx":203 + /* "ssh/session.pyx":202 * cdef c_ssh.socket_t _sock * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) # <<<<<<<<<<<<<< @@ -4119,7 +4075,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":202 + /* "ssh/session.pyx":201 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4138,7 +4094,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ } } - /* "ssh/session.pyx":204 + /* "ssh/session.pyx":203 * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) * return _sock # <<<<<<<<<<<<<< @@ -4146,13 +4102,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, 204, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_socket_t(__pyx_v__sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":200 + /* "ssh/session.pyx":199 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4171,7 +4127,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/session.pyx":206 +/* "ssh/session.pyx":205 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4205,7 +4161,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":209 + /* "ssh/session.pyx":208 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4220,16 +4176,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":210 + /* "ssh/session.pyx":209 * 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, 210, __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, 209, __pyx_L4_error) - /* "ssh/session.pyx":211 + /* "ssh/session.pyx":210 * with nogil: * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) # <<<<<<<<<<<<<< @@ -4239,7 +4195,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":209 + /* "ssh/session.pyx":208 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4265,19 +4221,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx } } - /* "ssh/session.pyx":212 + /* "ssh/session.pyx":211 * _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, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":213 + /* "ssh/session.pyx":212 * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -4289,7 +4245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":206 + /* "ssh/session.pyx":205 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4309,7 +4265,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":215 +/* "ssh/session.pyx":214 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4342,7 +4298,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":217 + /* "ssh/session.pyx":216 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4357,16 +4313,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ #endif /*try:*/ { - /* "ssh/session.pyx":218 + /* "ssh/session.pyx":217 * 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, 218, __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, 217, __pyx_L4_error) - /* "ssh/session.pyx":219 + /* "ssh/session.pyx":218 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) # <<<<<<<<<<<<<< @@ -4376,7 +4332,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":217 + /* "ssh/session.pyx":216 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4402,7 +4358,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ } } - /* "ssh/session.pyx":220 + /* "ssh/session.pyx":219 * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4410,13 +4366,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, 220, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":215 + /* "ssh/session.pyx":214 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4435,7 +4391,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ return __pyx_r; } -/* "ssh/session.pyx":222 +/* "ssh/session.pyx":221 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4465,7 +4421,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":223 + /* "ssh/session.pyx":222 * * def get_server_publickey(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -4473,9 +4429,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, 223, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) - /* "ssh/session.pyx":222 + /* "ssh/session.pyx":221 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4492,7 +4448,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U return __pyx_r; } -/* "ssh/session.pyx":225 +/* "ssh/session.pyx":224 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4524,7 +4480,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":227 + /* "ssh/session.pyx":226 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4539,7 +4495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":228 + /* "ssh/session.pyx":227 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_version(self._session) # <<<<<<<<<<<<<< @@ -4549,7 +4505,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":227 + /* "ssh/session.pyx":226 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4568,7 +4524,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ } } - /* "ssh/session.pyx":229 + /* "ssh/session.pyx":228 * with nogil: * rc = c_ssh.ssh_get_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4576,13 +4532,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, 229, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":225 + /* "ssh/session.pyx":224 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4601,7 +4557,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":231 +/* "ssh/session.pyx":230 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4633,7 +4589,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":233 + /* "ssh/session.pyx":232 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4648,7 +4604,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":234 + /* "ssh/session.pyx":233 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_status(self._session) # <<<<<<<<<<<<<< @@ -4658,7 +4614,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":233 + /* "ssh/session.pyx":232 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4677,7 +4633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 } } - /* "ssh/session.pyx":235 + /* "ssh/session.pyx":234 * with nogil: * rc = c_ssh.ssh_get_status(self._session) * return rc # <<<<<<<<<<<<<< @@ -4685,13 +4641,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, 235, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":231 + /* "ssh/session.pyx":230 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4710,7 +4666,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":237 +/* "ssh/session.pyx":236 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4742,7 +4698,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":239 + /* "ssh/session.pyx":238 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4757,7 +4713,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":240 + /* "ssh/session.pyx":239 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) # <<<<<<<<<<<<<< @@ -4767,7 +4723,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":239 + /* "ssh/session.pyx":238 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4786,7 +4742,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o } } - /* "ssh/session.pyx":241 + /* "ssh/session.pyx":240 * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) * return rc # <<<<<<<<<<<<<< @@ -4794,13 +4750,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, 241, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":237 + /* "ssh/session.pyx":236 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4819,7 +4775,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":243 +/* "ssh/session.pyx":242 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4852,7 +4808,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":245 + /* "ssh/session.pyx":244 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4867,7 +4823,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":246 + /* "ssh/session.pyx":245 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) # <<<<<<<<<<<<<< @@ -4877,7 +4833,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":245 + /* "ssh/session.pyx":244 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4896,7 +4852,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ } } - /* "ssh/session.pyx":247 + /* "ssh/session.pyx":246 * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4905,13 +4861,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, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":243 + /* "ssh/session.pyx":242 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4930,7 +4886,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":249 +/* "ssh/session.pyx":248 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -4963,7 +4919,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":251 + /* "ssh/session.pyx":250 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4978,7 +4934,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":252 + /* "ssh/session.pyx":251 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_connected(self._session) # <<<<<<<<<<<<<< @@ -4988,7 +4944,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":251 + /* "ssh/session.pyx":250 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5007,7 +4963,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj } } - /* "ssh/session.pyx":253 + /* "ssh/session.pyx":252 * with nogil: * rc = c_ssh.ssh_is_connected(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5016,13 +4972,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, 253, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":249 + /* "ssh/session.pyx":248 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -5041,7 +4997,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":255 +/* "ssh/session.pyx":254 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5074,7 +5030,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":257 + /* "ssh/session.pyx":256 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5089,7 +5045,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":258 + /* "ssh/session.pyx":257 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) # <<<<<<<<<<<<<< @@ -5099,7 +5055,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":257 + /* "ssh/session.pyx":256 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5118,7 +5074,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ } } - /* "ssh/session.pyx":259 + /* "ssh/session.pyx":258 * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5127,13 +5083,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, 259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":255 + /* "ssh/session.pyx":254 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5152,7 +5108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":261 +/* "ssh/session.pyx":260 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5170,7 +5126,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, 261, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_destination), __pyx_ptype_3ssh_7session_Session, 1, "destination", 0))) __PYX_ERR(0, 260, __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 */ @@ -5193,7 +5149,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":263 + /* "ssh/session.pyx":262 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5208,7 +5164,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":264 + /* "ssh/session.pyx":263 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) # <<<<<<<<<<<<<< @@ -5218,7 +5174,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":263 + /* "ssh/session.pyx":262 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5237,7 +5193,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj } } - /* "ssh/session.pyx":265 + /* "ssh/session.pyx":264 * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5245,14 +5201,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, 265, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __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, 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_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":261 + /* "ssh/session.pyx":260 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5271,7 +5227,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":267 +/* "ssh/session.pyx":266 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5301,7 +5257,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_getopt", 0); - /* "ssh/session.pyx":268 + /* "ssh/session.pyx":267 * * def options_getopt(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -5309,9 +5265,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, 268, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) - /* "ssh/session.pyx":267 + /* "ssh/session.pyx":266 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5328,7 +5284,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED return __pyx_r; } -/* "ssh/session.pyx":270 +/* "ssh/session.pyx":269 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5364,19 +5320,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":271 + /* "ssh/session.pyx":270 * * 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, 271, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_b_filepath = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":272 + /* "ssh/session.pyx":271 * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) * cdef char *c_filepath = b_filepath # <<<<<<<<<<<<<< @@ -5385,12 +5341,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, 272, __pyx_L1_error) + __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, 272, __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_v_c_filepath = __pyx_t_2; - /* "ssh/session.pyx":274 + /* "ssh/session.pyx":273 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5405,7 +5361,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ #endif /*try:*/ { - /* "ssh/session.pyx":275 + /* "ssh/session.pyx":274 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) # <<<<<<<<<<<<<< @@ -5415,7 +5371,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":274 + /* "ssh/session.pyx":273 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5434,7 +5390,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ } } - /* "ssh/session.pyx":276 + /* "ssh/session.pyx":275 * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5442,14 +5398,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, 276, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":270 + /* "ssh/session.pyx":269 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5469,7 +5425,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ return __pyx_r; } -/* "ssh/session.pyx":278 +/* "ssh/session.pyx":277 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5489,7 +5445,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, 278, __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, 277, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5515,7 +5471,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":280 + /* "ssh/session.pyx":279 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5530,7 +5486,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":281 + /* "ssh/session.pyx":280 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_set( # <<<<<<<<<<<<<< @@ -5540,7 +5496,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":280 + /* "ssh/session.pyx":279 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5559,7 +5515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx } } - /* "ssh/session.pyx":283 + /* "ssh/session.pyx":282 * rc = c_ssh.ssh_options_set( * self._session, c_ssh.ssh_options_e.SSH_OPTIONS_PORT, &port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5567,14 +5523,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx * 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, 283, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __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, 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_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":278 + /* "ssh/session.pyx":277 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5593,7 +5549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":285 +/* "ssh/session.pyx":284 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5636,11 +5592,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_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, 285, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 284, __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, 285, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 284, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5653,13 +5609,13 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_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, 285, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 284, __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, 285, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 284, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_56options_set(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_option, __pyx_v_value); /* function exit code */ @@ -5685,19 +5641,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set", 0); - /* "ssh/session.pyx":294 + /* "ssh/session.pyx":293 * :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, 294, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":297 + /* "ssh/session.pyx":296 * cdef char *c_value * cdef int rc * c_value = b_value # <<<<<<<<<<<<<< @@ -5706,12 +5662,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 297, __pyx_L1_error) + __PYX_ERR(0, 296, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/session.pyx":298 + /* "ssh/session.pyx":297 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5726,7 +5682,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":299 + /* "ssh/session.pyx":298 * c_value = b_value * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) # <<<<<<<<<<<<<< @@ -5736,7 +5692,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_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":298 + /* "ssh/session.pyx":297 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5755,7 +5711,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ } } - /* "ssh/session.pyx":300 + /* "ssh/session.pyx":299 * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5763,14 +5719,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_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, 300, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __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, 299, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":285 + /* "ssh/session.pyx":284 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5790,7 +5746,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":302 +/* "ssh/session.pyx":301 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5808,7 +5764,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_59options_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, 302, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 301, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_58options_get(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7options_Option *)__pyx_v_option)); /* function exit code */ @@ -5835,7 +5791,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get", 0); - /* "ssh/session.pyx":307 + /* "ssh/session.pyx":306 * """ * cdef char *_value * cdef char **value = NULL # <<<<<<<<<<<<<< @@ -5844,7 +5800,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v_value = NULL; - /* "ssh/session.pyx":310 + /* "ssh/session.pyx":309 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5859,7 +5815,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":311 + /* "ssh/session.pyx":310 * cdef bytes b_value * with nogil: * rc = c_ssh.ssh_options_get( # <<<<<<<<<<<<<< @@ -5869,7 +5825,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_v_rc = ssh_options_get(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_value); } - /* "ssh/session.pyx":310 + /* "ssh/session.pyx":309 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5888,7 +5844,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ } } - /* "ssh/session.pyx":313 + /* "ssh/session.pyx":312 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5898,20 +5854,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_rc < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/session.pyx":314 + /* "ssh/session.pyx":313 * 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, 314, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __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, 314, __pyx_L1_error) + __PYX_ERR(0, 313, __pyx_L1_error) - /* "ssh/session.pyx":313 + /* "ssh/session.pyx":312 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5920,7 +5876,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ } - /* "ssh/session.pyx":315 + /* "ssh/session.pyx":314 * if rc < 0: * raise OptionError * _value = value[0] # <<<<<<<<<<<<<< @@ -5929,19 +5885,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v__value = (__pyx_v_value[0]); - /* "ssh/session.pyx":316 + /* "ssh/session.pyx":315 * 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, 316, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_value = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":317 + /* "ssh/session.pyx":316 * _value = value[0] * b_value = _value * c_ssh.ssh_string_free_char(_value) # <<<<<<<<<<<<<< @@ -5950,7 +5906,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ ssh_string_free_char(__pyx_v__value); - /* "ssh/session.pyx":318 + /* "ssh/session.pyx":317 * b_value = _value * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) # <<<<<<<<<<<<<< @@ -5958,14 +5914,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_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, 318, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":302 + /* "ssh/session.pyx":301 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5985,7 +5941,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":320 +/* "ssh/session.pyx":319 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6005,7 +5961,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_61options_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, 320, __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, 319, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6031,7 +5987,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get_port", 0); - /* "ssh/session.pyx":322 + /* "ssh/session.pyx":321 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6046,7 +6002,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":323 + /* "ssh/session.pyx":322 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) # <<<<<<<<<<<<<< @@ -6056,7 +6012,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx __pyx_v_rc = ssh_options_get_port(__pyx_v_self->_session, (&__pyx_v_port_target)); } - /* "ssh/session.pyx":322 + /* "ssh/session.pyx":321 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6075,7 +6031,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx } } - /* "ssh/session.pyx":324 + /* "ssh/session.pyx":323 * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6083,14 +6039,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_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, 324, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __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, 323, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":320 + /* "ssh/session.pyx":319 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6109,7 +6065,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":326 +/* "ssh/session.pyx":325 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6127,7 +6083,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_63send_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, 326, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 325, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_62send_ignore(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6152,7 +6108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_ignore", 0); - /* "ssh/session.pyx":327 + /* "ssh/session.pyx":326 * * def send_ignore(self, bytes data): * cdef char *c_data = data # <<<<<<<<<<<<<< @@ -6161,12 +6117,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 327, __pyx_L1_error) + __PYX_ERR(0, 326, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 326, __pyx_L1_error) __pyx_v_c_data = __pyx_t_1; - /* "ssh/session.pyx":329 + /* "ssh/session.pyx":328 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6181,7 +6137,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":330 + /* "ssh/session.pyx":329 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) # <<<<<<<<<<<<<< @@ -6191,7 +6147,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ __pyx_v_rc = ssh_send_ignore(__pyx_v_self->_session, __pyx_v_c_data); } - /* "ssh/session.pyx":329 + /* "ssh/session.pyx":328 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6210,7 +6166,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ } } - /* "ssh/session.pyx":331 + /* "ssh/session.pyx":330 * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6218,14 +6174,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_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, 331, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __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, 330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":326 + /* "ssh/session.pyx":325 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6244,7 +6200,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":333 +/* "ssh/session.pyx":332 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6287,11 +6243,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_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, 333, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 332, __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, 333, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 332, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6300,17 +6256,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_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, 333, __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, 332, __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, 333, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 332, __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, 333, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 332, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_64send_debug(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_message, __pyx_v_always_display); /* function exit code */ @@ -6335,7 +6291,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_debug", 0); - /* "ssh/session.pyx":334 + /* "ssh/session.pyx":333 * * def send_debug(self, bytes message, int always_display): * cdef char *c_message = message # <<<<<<<<<<<<<< @@ -6344,12 +6300,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 */ if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 334, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L1_error) __pyx_v_c_message = __pyx_t_1; - /* "ssh/session.pyx":336 + /* "ssh/session.pyx":335 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6364,7 +6320,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":337 + /* "ssh/session.pyx":336 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_debug( # <<<<<<<<<<<<<< @@ -6374,7 +6330,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_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":336 + /* "ssh/session.pyx":335 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6393,7 +6349,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 } } - /* "ssh/session.pyx":339 + /* "ssh/session.pyx":338 * rc = c_ssh.ssh_send_debug( * self._session, c_message, always_display) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6401,14 +6357,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 * def gssapi_set_creds(self, creds): */ __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, 339, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __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, 338, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":333 + /* "ssh/session.pyx":332 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6427,7 +6383,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":341 +/* "ssh/session.pyx":340 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6457,7 +6413,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gssapi_set_creds", 0); - /* "ssh/session.pyx":342 + /* "ssh/session.pyx":341 * * def gssapi_set_creds(self, creds): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6465,9 +6421,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE * def service_request(self, bytes service): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 342, __pyx_L1_error) + __PYX_ERR(0, 341, __pyx_L1_error) - /* "ssh/session.pyx":341 + /* "ssh/session.pyx":340 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6484,7 +6440,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE return __pyx_r; } -/* "ssh/session.pyx":344 +/* "ssh/session.pyx":343 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6502,7 +6458,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_69service_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, 344, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 343, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_68service_request(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_service)); /* function exit code */ @@ -6527,7 +6483,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("service_request", 0); - /* "ssh/session.pyx":346 + /* "ssh/session.pyx":345 * def service_request(self, bytes service): * cdef int rc * cdef char *c_service = service # <<<<<<<<<<<<<< @@ -6536,12 +6492,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ */ if (unlikely(__pyx_v_service == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 345, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L1_error) __pyx_v_c_service = __pyx_t_1; - /* "ssh/session.pyx":347 + /* "ssh/session.pyx":346 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6556,7 +6512,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":348 + /* "ssh/session.pyx":347 * cdef char *c_service = service * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) # <<<<<<<<<<<<<< @@ -6566,7 +6522,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ __pyx_v_rc = ssh_service_request(__pyx_v_self->_session, __pyx_v_c_service); } - /* "ssh/session.pyx":347 + /* "ssh/session.pyx":346 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6585,7 +6541,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ } } - /* "ssh/session.pyx":349 + /* "ssh/session.pyx":348 * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6593,14 +6549,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_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, 349, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __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, 348, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":344 + /* "ssh/session.pyx":343 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6619,7 +6575,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":353 +/* "ssh/session.pyx":352 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6637,7 +6593,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_71set_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, 353, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 352, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_70set_agent_channel(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_channel)); /* function exit code */ @@ -6660,7 +6616,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_channel", 0); - /* "ssh/session.pyx":355 + /* "ssh/session.pyx":354 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6675,7 +6631,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":356 + /* "ssh/session.pyx":355 * cdef int rc * with nogil: * rc = c_ssh.ssh_set_agent_channel( # <<<<<<<<<<<<<< @@ -6685,7 +6641,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py __pyx_v_rc = ssh_set_agent_channel(__pyx_v_self->_session, __pyx_v_channel->_channel); } - /* "ssh/session.pyx":355 + /* "ssh/session.pyx":354 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6704,7 +6660,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py } } - /* "ssh/session.pyx":358 + /* "ssh/session.pyx":357 * rc = c_ssh.ssh_set_agent_channel( * self._session, channel._channel) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6712,14 +6668,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_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, 358, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __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, 357, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":353 + /* "ssh/session.pyx":352 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6738,7 +6694,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py return __pyx_r; } -/* "ssh/session.pyx":360 +/* "ssh/session.pyx":359 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6757,7 +6713,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_73set_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, 360, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 359, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_72set_agent_socket(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_socket)); @@ -6782,17 +6738,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_socket", 0); - /* "ssh/session.pyx":362 + /* "ssh/session.pyx":361 * 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, 362, __pyx_L1_error) + __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) __pyx_v__sock = __pyx_t_1; - /* "ssh/session.pyx":363 + /* "ssh/session.pyx":362 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6807,7 +6763,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":364 + /* "ssh/session.pyx":363 * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) # <<<<<<<<<<<<<< @@ -6817,7 +6773,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx __pyx_v_rc = ssh_set_agent_socket(__pyx_v_self->_session, __pyx_v__sock); } - /* "ssh/session.pyx":363 + /* "ssh/session.pyx":362 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6836,7 +6792,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx } } - /* "ssh/session.pyx":365 + /* "ssh/session.pyx":364 * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6844,14 +6800,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_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, 365, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __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, 364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":360 + /* "ssh/session.pyx":359 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6870,7 +6826,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":367 +/* "ssh/session.pyx":366 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6890,7 +6846,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_75set_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, 367, __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, 366, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6910,7 +6866,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/session.pyx":368 + /* "ssh/session.pyx":367 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6925,7 +6881,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":369 + /* "ssh/session.pyx":368 * def set_blocking(self, int blocking): * with nogil: * c_ssh.ssh_set_blocking(self._session, blocking) # <<<<<<<<<<<<<< @@ -6935,7 +6891,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj ssh_set_blocking(__pyx_v_self->_session, __pyx_v_blocking); } - /* "ssh/session.pyx":368 + /* "ssh/session.pyx":367 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6954,7 +6910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj } } - /* "ssh/session.pyx":367 + /* "ssh/session.pyx":366 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6969,7 +6925,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":371 +/* "ssh/session.pyx":370 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7012,11 +6968,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_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, 371, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 370, __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, 371, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 370, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7029,7 +6985,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_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, 371, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 370, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.set_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7050,7 +7006,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counters", 0); - /* "ssh/session.pyx":372 + /* "ssh/session.pyx":371 * * def set_counters(self, scounter, rcounter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -7058,9 +7014,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st * def set_fd_except(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 372, __pyx_L1_error) + __PYX_ERR(0, 371, __pyx_L1_error) - /* "ssh/session.pyx":371 + /* "ssh/session.pyx":370 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7077,7 +7033,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st return __pyx_r; } -/* "ssh/session.pyx":374 +/* "ssh/session.pyx":373 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7104,7 +7060,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_except", 0); - /* "ssh/session.pyx":375 + /* "ssh/session.pyx":374 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7119,7 +7075,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":376 + /* "ssh/session.pyx":375 * def set_fd_except(self): * with nogil: * c_ssh.ssh_set_fd_except(self._session) # <<<<<<<<<<<<<< @@ -7129,7 +7085,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob ssh_set_fd_except(__pyx_v_self->_session); } - /* "ssh/session.pyx":375 + /* "ssh/session.pyx":374 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7148,7 +7104,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob } } - /* "ssh/session.pyx":374 + /* "ssh/session.pyx":373 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7163,7 +7119,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":378 +/* "ssh/session.pyx":377 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7190,7 +7146,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_toread", 0); - /* "ssh/session.pyx":379 + /* "ssh/session.pyx":378 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7205,7 +7161,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":380 + /* "ssh/session.pyx":379 * def set_fd_toread(self): * with nogil: * c_ssh.ssh_set_fd_toread(self._session) # <<<<<<<<<<<<<< @@ -7215,7 +7171,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob ssh_set_fd_toread(__pyx_v_self->_session); } - /* "ssh/session.pyx":379 + /* "ssh/session.pyx":378 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7234,7 +7190,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob } } - /* "ssh/session.pyx":378 + /* "ssh/session.pyx":377 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7249,7 +7205,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":382 +/* "ssh/session.pyx":381 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7276,7 +7232,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_towrite", 0); - /* "ssh/session.pyx":383 + /* "ssh/session.pyx":382 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7291,7 +7247,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":384 + /* "ssh/session.pyx":383 * def set_fd_towrite(self): * with nogil: * c_ssh.ssh_set_fd_towrite(self._session) # <<<<<<<<<<<<<< @@ -7301,7 +7257,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o ssh_set_fd_towrite(__pyx_v_self->_session); } - /* "ssh/session.pyx":383 + /* "ssh/session.pyx":382 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7320,7 +7276,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o } } - /* "ssh/session.pyx":382 + /* "ssh/session.pyx":381 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7335,7 +7291,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":386 +/* "ssh/session.pyx":385 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7362,7 +7318,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("silent_disconnect", 0); - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":386 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7377,7 +7333,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":388 + /* "ssh/session.pyx":387 * def silent_disconnect(self): * with nogil: * c_ssh.ssh_silent_disconnect(self._session) # <<<<<<<<<<<<<< @@ -7387,7 +7343,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py ssh_silent_disconnect(__pyx_v_self->_session); } - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":386 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7406,7 +7362,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py } } - /* "ssh/session.pyx":386 + /* "ssh/session.pyx":385 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7421,7 +7377,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py return __pyx_r; } -/* "ssh/session.pyx":390 +/* "ssh/session.pyx":389 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7455,7 +7411,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_none", 0); - /* "ssh/session.pyx":392 + /* "ssh/session.pyx":391 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7470,16 +7426,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":393 + /* "ssh/session.pyx":392 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_none(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, 393, __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, 392, __pyx_L4_error) - /* "ssh/session.pyx":394 + /* "ssh/session.pyx":393 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) # <<<<<<<<<<<<<< @@ -7489,7 +7445,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob __pyx_v_rc = ssh_userauth_none(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":392 + /* "ssh/session.pyx":391 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7515,7 +7471,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob } } - /* "ssh/session.pyx":395 + /* "ssh/session.pyx":394 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7523,14 +7479,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob * def userauth_list(self): */ __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, 395, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __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, 394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":390 + /* "ssh/session.pyx":389 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7549,7 +7505,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":397 +/* "ssh/session.pyx":396 * return handle_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7583,7 +7539,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_list", 0); - /* "ssh/session.pyx":399 + /* "ssh/session.pyx":398 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7598,16 +7554,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":400 + /* "ssh/session.pyx":399 * 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, 400, __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, 399, __pyx_L4_error) - /* "ssh/session.pyx":401 + /* "ssh/session.pyx":400 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) # <<<<<<<<<<<<<< @@ -7617,7 +7573,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob __pyx_v_rc = ssh_userauth_list(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":399 + /* "ssh/session.pyx":398 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7643,7 +7599,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob } } - /* "ssh/session.pyx":402 + /* "ssh/session.pyx":401 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7651,14 +7607,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_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, 402, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __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, 401, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":397 + /* "ssh/session.pyx":396 * return handle_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7677,7 +7633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":404 +/* "ssh/session.pyx":403 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7695,7 +7651,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_91userauth_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, 404, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 403, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_pubkey)); /* function exit code */ @@ -7719,7 +7675,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_try_publickey", 0); - /* "ssh/session.pyx":406 + /* "ssh/session.pyx":405 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7734,16 +7690,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct #endif /*try:*/ { - /* "ssh/session.pyx":407 + /* "ssh/session.pyx":406 * 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, 407, __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, 406, __pyx_L4_error) - /* "ssh/session.pyx":408 + /* "ssh/session.pyx":407 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_try_publickey( # <<<<<<<<<<<<<< @@ -7753,7 +7709,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct __pyx_v_rc = ssh_userauth_try_publickey(__pyx_v_self->_session, NULL, __pyx_v_pubkey->_key); } - /* "ssh/session.pyx":406 + /* "ssh/session.pyx":405 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7779,7 +7735,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct } } - /* "ssh/session.pyx":410 + /* "ssh/session.pyx":409 * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7787,14 +7743,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_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, 410, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __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, 409, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":404 + /* "ssh/session.pyx":403 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7813,7 +7769,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct return __pyx_r; } -/* "ssh/session.pyx":412 +/* "ssh/session.pyx":411 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7831,7 +7787,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_93userauth_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, 412, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 411, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_92userauth_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_privkey)); /* function exit code */ @@ -7855,7 +7811,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey", 0); - /* "ssh/session.pyx":414 + /* "ssh/session.pyx":413 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7870,16 +7826,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p #endif /*try:*/ { - /* "ssh/session.pyx":415 + /* "ssh/session.pyx":414 * 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, 415, __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, 414, __pyx_L4_error) - /* "ssh/session.pyx":416 + /* "ssh/session.pyx":415 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey( # <<<<<<<<<<<<<< @@ -7889,7 +7845,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p __pyx_v_rc = ssh_userauth_publickey(__pyx_v_self->_session, NULL, __pyx_v_privkey->_key); } - /* "ssh/session.pyx":414 + /* "ssh/session.pyx":413 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7915,7 +7871,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p } } - /* "ssh/session.pyx":418 + /* "ssh/session.pyx":417 * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7923,14 +7879,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_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, 418, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __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, 417, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":412 + /* "ssh/session.pyx":411 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7949,7 +7905,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p return __pyx_r; } -/* "ssh/session.pyx":422 +/* "ssh/session.pyx":421 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -7968,7 +7924,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_95userauth_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, 422, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 421, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_94userauth_agent(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_username)); @@ -7996,19 +7952,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_agent", 0); - /* "ssh/session.pyx":423 + /* "ssh/session.pyx":422 * 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, 423, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":424 + /* "ssh/session.pyx":423 * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8017,12 +7973,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 424, __pyx_L1_error) + __PYX_ERR(0, 423, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":426 + /* "ssh/session.pyx":425 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8037,16 +7993,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":426 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_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, 427, __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, 426, __pyx_L4_error) - /* "ssh/session.pyx":428 + /* "ssh/session.pyx":427 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) # <<<<<<<<<<<<<< @@ -8056,7 +8012,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o __pyx_v_rc = ssh_userauth_agent(__pyx_v_self->_session, __pyx_v_c_username); } - /* "ssh/session.pyx":426 + /* "ssh/session.pyx":425 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8082,7 +8038,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o } } - /* "ssh/session.pyx":429 + /* "ssh/session.pyx":428 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8090,14 +8046,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o * def userauth_publickey_auto(self, passphrase not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 429, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":422 + /* "ssh/session.pyx":421 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8117,7 +8073,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":431 +/* "ssh/session.pyx":430 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8136,7 +8092,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_97userauth_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, 431, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 430, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_passphrase)); @@ -8164,19 +8120,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_auto", 0); - /* "ssh/session.pyx":432 + /* "ssh/session.pyx":431 * * 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, 432, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":433 + /* "ssh/session.pyx":432 * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *c_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -8185,12 +8141,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 433, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error) __pyx_v_c_passphrase = __pyx_t_2; - /* "ssh/session.pyx":435 + /* "ssh/session.pyx":434 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8205,16 +8161,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc #endif /*try:*/ { - /* "ssh/session.pyx":436 + /* "ssh/session.pyx":435 * 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, 436, __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, 435, __pyx_L4_error) - /* "ssh/session.pyx":437 + /* "ssh/session.pyx":436 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey_auto( # <<<<<<<<<<<<<< @@ -8224,7 +8180,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc __pyx_v_rc = ssh_userauth_publickey_auto(__pyx_v_self->_session, NULL, __pyx_v_c_passphrase); } - /* "ssh/session.pyx":435 + /* "ssh/session.pyx":434 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8250,7 +8206,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc } } - /* "ssh/session.pyx":439 + /* "ssh/session.pyx":438 * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8258,14 +8214,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_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_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 439, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":431 + /* "ssh/session.pyx":430 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8285,7 +8241,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc return __pyx_r; } -/* "ssh/session.pyx":441 +/* "ssh/session.pyx":440 * return handle_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8328,11 +8284,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_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, 441, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 440, __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, 441, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 440, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8345,17 +8301,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_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, 441, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 440, __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, 441, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 440, __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, 441, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 440, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_98userauth_password(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); @@ -8385,31 +8341,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_password", 0); - /* "ssh/session.pyx":442 + /* "ssh/session.pyx":441 * * 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, 442, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":443 + /* "ssh/session.pyx":442 * 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, 443, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_password = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":444 + /* "ssh/session.pyx":443 * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8418,12 +8374,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 444, __pyx_L1_error) + __PYX_ERR(0, 443, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":445 + /* "ssh/session.pyx":444 * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username * cdef char *c_password = b_password # <<<<<<<<<<<<<< @@ -8432,12 +8388,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_password == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 445, __pyx_L1_error) + __PYX_ERR(0, 444, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __pyx_v_c_password = __pyx_t_2; - /* "ssh/session.pyx":447 + /* "ssh/session.pyx":446 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8452,16 +8408,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":447 * 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, 448, __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, 447, __pyx_L4_error) - /* "ssh/session.pyx":449 + /* "ssh/session.pyx":448 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_password( # <<<<<<<<<<<<<< @@ -8471,7 +8427,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py __pyx_v_rc = ssh_userauth_password(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_password); } - /* "ssh/session.pyx":447 + /* "ssh/session.pyx":446 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8497,7 +8453,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py } } - /* "ssh/session.pyx":451 + /* "ssh/session.pyx":450 * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8505,14 +8461,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py * def userauth_kbdint(self, username not None, submethods not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_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_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":441 + /* "ssh/session.pyx":440 * return handle_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8533,7 +8489,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py return __pyx_r; } -/* "ssh/session.pyx":453 +/* "ssh/session.pyx":452 * return handle_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8576,11 +8532,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_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, 453, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 452, __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, 453, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 452, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8593,17 +8549,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_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, 453, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 452, __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, 453, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 452, __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, 453, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 452, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_100userauth_kbdint(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_submethods); @@ -8633,31 +8589,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint", 0); - /* "ssh/session.pyx":454 + /* "ssh/session.pyx":453 * * 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, 454, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":455 + /* "ssh/session.pyx":454 * 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, 455, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_submethods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":456 + /* "ssh/session.pyx":455 * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8666,12 +8622,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 456, __pyx_L1_error) + __PYX_ERR(0, 455, __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_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":457 + /* "ssh/session.pyx":456 * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods # <<<<<<<<<<<<<< @@ -8680,12 +8636,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_submethods == 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_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error) __pyx_v_c_submethods = __pyx_t_2; - /* "ssh/session.pyx":459 + /* "ssh/session.pyx":458 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8700,16 +8656,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":459 * 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, 460, __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, 459, __pyx_L4_error) - /* "ssh/session.pyx":461 + /* "ssh/session.pyx":460 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint( # <<<<<<<<<<<<<< @@ -8719,7 +8675,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx __pyx_v_rc = ssh_userauth_kbdint(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_submethods); } - /* "ssh/session.pyx":459 + /* "ssh/session.pyx":458 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8745,7 +8701,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx } } - /* "ssh/session.pyx":463 + /* "ssh/session.pyx":462 * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8753,14 +8709,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx * def userauth_kbdint_getinstruction(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_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_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":453 + /* "ssh/session.pyx":452 * return handle_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8781,7 +8737,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":465 +/* "ssh/session.pyx":464 * return handle_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8815,7 +8771,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getinstruction", 0); - /* "ssh/session.pyx":468 + /* "ssh/session.pyx":467 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8830,16 +8786,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi #endif /*try:*/ { - /* "ssh/session.pyx":469 + /* "ssh/session.pyx":468 * 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, 469, __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, 468, __pyx_L4_error) - /* "ssh/session.pyx":470 + /* "ssh/session.pyx":469 * with nogil: * _check_connected(self._session) * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( # <<<<<<<<<<<<<< @@ -8849,7 +8805,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_v__instruction = ssh_userauth_kbdint_getinstruction(__pyx_v_self->_session); } - /* "ssh/session.pyx":468 + /* "ssh/session.pyx":467 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8875,20 +8831,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi } } - /* "ssh/session.pyx":472 + /* "ssh/session.pyx":471 * _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, 472, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __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, 472, __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, 471, __pyx_L1_error) __pyx_v_b_instruction = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":473 + /* "ssh/session.pyx":472 * self._session) * b_instruction = to_str(_instruction) * return b_instruction # <<<<<<<<<<<<<< @@ -8900,7 +8856,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_r = __pyx_v_b_instruction; goto __pyx_L0; - /* "ssh/session.pyx":465 + /* "ssh/session.pyx":464 * return handle_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8920,7 +8876,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi return __pyx_r; } -/* "ssh/session.pyx":475 +/* "ssh/session.pyx":474 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -8954,7 +8910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getname", 0); - /* "ssh/session.pyx":478 + /* "ssh/session.pyx":477 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -8969,16 +8925,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru #endif /*try:*/ { - /* "ssh/session.pyx":479 + /* "ssh/session.pyx":478 * 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, 479, __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, 478, __pyx_L4_error) - /* "ssh/session.pyx":480 + /* "ssh/session.pyx":479 * with nogil: * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) # <<<<<<<<<<<<<< @@ -8988,7 +8944,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_v__name = ssh_userauth_kbdint_getname(__pyx_v_self->_session); } - /* "ssh/session.pyx":478 + /* "ssh/session.pyx":477 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9014,20 +8970,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru } } - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":480 * _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, 481, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __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, 481, __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, 480, __pyx_L1_error) __pyx_v_b_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":482 + /* "ssh/session.pyx":481 * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) * return b_name # <<<<<<<<<<<<<< @@ -9039,7 +8995,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_r = __pyx_v_b_name; goto __pyx_L0; - /* "ssh/session.pyx":475 + /* "ssh/session.pyx":474 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -9059,7 +9015,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru return __pyx_r; } -/* "ssh/session.pyx":484 +/* "ssh/session.pyx":483 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9092,7 +9048,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnprompts", 0); - /* "ssh/session.pyx":486 + /* "ssh/session.pyx":485 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9107,16 +9063,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( #endif /*try:*/ { - /* "ssh/session.pyx":487 + /* "ssh/session.pyx":486 * 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, 487, __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, 486, __pyx_L4_error) - /* "ssh/session.pyx":488 + /* "ssh/session.pyx":487 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) # <<<<<<<<<<<<<< @@ -9126,7 +9082,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( __pyx_v_rc = ssh_userauth_kbdint_getnprompts(__pyx_v_self->_session); } - /* "ssh/session.pyx":486 + /* "ssh/session.pyx":485 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9152,7 +9108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( } } - /* "ssh/session.pyx":489 + /* "ssh/session.pyx":488 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc # <<<<<<<<<<<<<< @@ -9160,13 +9116,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_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, 489, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":484 + /* "ssh/session.pyx":483 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9185,7 +9141,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( return __pyx_r; } -/* "ssh/session.pyx":491 +/* "ssh/session.pyx":490 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9228,11 +9184,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_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, 491, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 490, __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, 491, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 490, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9240,18 +9196,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_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, 491, __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, 490, __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, 491, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __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, 491, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 490, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_echo); /* function exit code */ @@ -9277,17 +9233,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getprompt", 0); - /* "ssh/session.pyx":494 + /* "ssh/session.pyx":493 * 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, 494, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error) __pyx_v_c_echo = __pyx_t_1; - /* "ssh/session.pyx":495 + /* "ssh/session.pyx":494 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9302,16 +9258,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st #endif /*try:*/ { - /* "ssh/session.pyx":496 + /* "ssh/session.pyx":495 * 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, 496, __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, 495, __pyx_L4_error) - /* "ssh/session.pyx":497 + /* "ssh/session.pyx":496 * with nogil: * _check_connected(self._session) * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( # <<<<<<<<<<<<<< @@ -9321,7 +9277,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_v__prompt = ssh_userauth_kbdint_getprompt(__pyx_v_self->_session, __pyx_v_i, __pyx_v_c_echo); } - /* "ssh/session.pyx":495 + /* "ssh/session.pyx":494 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9347,19 +9303,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st } } - /* "ssh/session.pyx":499 + /* "ssh/session.pyx":498 * _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, 499, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_b_prompt = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":500 + /* "ssh/session.pyx":499 * self._session, i, c_echo) * b_prompt = _prompt * return b_prompt # <<<<<<<<<<<<<< @@ -9371,7 +9327,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_r = __pyx_v_b_prompt; goto __pyx_L0; - /* "ssh/session.pyx":491 + /* "ssh/session.pyx":490 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9391,7 +9347,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st return __pyx_r; } -/* "ssh/session.pyx":502 +/* "ssh/session.pyx":501 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9424,7 +9380,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnanswers", 0); - /* "ssh/session.pyx":504 + /* "ssh/session.pyx":503 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9439,16 +9395,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( #endif /*try:*/ { - /* "ssh/session.pyx":505 + /* "ssh/session.pyx":504 * 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, 505, __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, 504, __pyx_L4_error) - /* "ssh/session.pyx":506 + /* "ssh/session.pyx":505 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) # <<<<<<<<<<<<<< @@ -9458,7 +9414,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( __pyx_v_rc = ssh_userauth_kbdint_getnanswers(__pyx_v_self->_session); } - /* "ssh/session.pyx":504 + /* "ssh/session.pyx":503 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9484,7 +9440,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( } } - /* "ssh/session.pyx":507 + /* "ssh/session.pyx":506 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc # <<<<<<<<<<<<<< @@ -9492,13 +9448,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_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, 507, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":502 + /* "ssh/session.pyx":501 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9517,7 +9473,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( return __pyx_r; } -/* "ssh/session.pyx":509 +/* "ssh/session.pyx":508 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9537,7 +9493,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_113userauth_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, 509, __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, 508, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9564,7 +9520,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getanswer", 0); - /* "ssh/session.pyx":512 + /* "ssh/session.pyx":511 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9579,16 +9535,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":513 + /* "ssh/session.pyx":512 * 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, 513, __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, 512, __pyx_L4_error) - /* "ssh/session.pyx":514 + /* "ssh/session.pyx":513 * with nogil: * _check_connected(self._session) * _answer = c_ssh.ssh_userauth_kbdint_getanswer( # <<<<<<<<<<<<<< @@ -9598,7 +9554,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_v__answer = ssh_userauth_kbdint_getanswer(__pyx_v_self->_session, __pyx_v_i); } - /* "ssh/session.pyx":512 + /* "ssh/session.pyx":511 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9624,19 +9580,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st } } - /* "ssh/session.pyx":516 + /* "ssh/session.pyx":515 * _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, 516, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_answer = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":517 + /* "ssh/session.pyx":516 * self._session, i) * b_answer = _answer * return b_answer # <<<<<<<<<<<<<< @@ -9648,7 +9604,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_r = __pyx_v_b_answer; goto __pyx_L0; - /* "ssh/session.pyx":509 + /* "ssh/session.pyx":508 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9668,7 +9624,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st return __pyx_r; } -/* "ssh/session.pyx":519 +/* "ssh/session.pyx":518 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9711,11 +9667,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_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, 519, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 518, __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, 519, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 518, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9723,18 +9679,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_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, 519, __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, 518, __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, 519, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 518, __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, 519, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 518, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_answer); /* function exit code */ @@ -9760,17 +9716,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_setanswer", 0); - /* "ssh/session.pyx":520 + /* "ssh/session.pyx":519 * * 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, 520, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error) __pyx_v_c_answer = __pyx_t_1; - /* "ssh/session.pyx":522 + /* "ssh/session.pyx":521 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9785,16 +9741,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":523 + /* "ssh/session.pyx":522 * 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, 523, __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, 522, __pyx_L4_error) - /* "ssh/session.pyx":524 + /* "ssh/session.pyx":523 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_setanswer( # <<<<<<<<<<<<<< @@ -9804,7 +9760,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_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":522 + /* "ssh/session.pyx":521 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9830,7 +9786,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st } } - /* "ssh/session.pyx":526 + /* "ssh/session.pyx":525 * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9838,14 +9794,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st * def userauth_gssapi(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, 526, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __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, 525, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/session.pyx":519 + /* "ssh/session.pyx":518 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9864,7 +9820,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st return __pyx_r; } -/* "ssh/session.pyx":528 +/* "ssh/session.pyx":527 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9898,7 +9854,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_gssapi", 0); - /* "ssh/session.pyx":530 + /* "ssh/session.pyx":529 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9913,16 +9869,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":531 + /* "ssh/session.pyx":530 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_gssapi(self._session) * 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, 531, __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, 530, __pyx_L4_error) - /* "ssh/session.pyx":532 + /* "ssh/session.pyx":531 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) # <<<<<<<<<<<<<< @@ -9932,7 +9888,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx __pyx_v_rc = ssh_userauth_gssapi(__pyx_v_self->_session); } - /* "ssh/session.pyx":530 + /* "ssh/session.pyx":529 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9958,7 +9914,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx } } - /* "ssh/session.pyx":533 + /* "ssh/session.pyx":532 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9966,14 +9922,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx * def write_knownhost(self): */ __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, 533, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __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, 532, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":528 + /* "ssh/session.pyx":527 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9992,7 +9948,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":535 +/* "ssh/session.pyx":534 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10025,7 +9981,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_knownhost", 0); - /* "ssh/session.pyx":537 + /* "ssh/session.pyx":536 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10040,7 +9996,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":538 + /* "ssh/session.pyx":537 * cdef int rc * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10050,7 +10006,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx __pyx_v_rc = ssh_write_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":537 + /* "ssh/session.pyx":536 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10069,7 +10025,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx } } - /* "ssh/session.pyx":539 + /* "ssh/session.pyx":538 * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10077,14 +10033,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_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, 539, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __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, 538, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":535 + /* "ssh/session.pyx":534 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10103,7 +10059,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":541 +/* "ssh/session.pyx":540 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10137,7 +10093,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_knownhost", 0); - /* "ssh/session.pyx":544 + /* "ssh/session.pyx":543 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10152,7 +10108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":545 + /* "ssh/session.pyx":544 * cdef bytes b_known_host * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10162,7 +10118,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_v__known_host = ssh_dump_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":544 + /* "ssh/session.pyx":543 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10181,7 +10137,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ } } - /* "ssh/session.pyx":546 + /* "ssh/session.pyx":545 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10191,7 +10147,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_t_1 = ((__pyx_v__known_host == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":547 + /* "ssh/session.pyx":546 * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: * return # <<<<<<<<<<<<<< @@ -10202,7 +10158,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":546 + /* "ssh/session.pyx":545 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10211,19 +10167,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ */ } - /* "ssh/session.pyx":548 + /* "ssh/session.pyx":547 * 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, 548, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_known_host = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":549 + /* "ssh/session.pyx":548 * return * b_known_host = _known_host * return b_known_host # <<<<<<<<<<<<<< @@ -10235,7 +10191,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = __pyx_v_b_known_host; goto __pyx_L0; - /* "ssh/session.pyx":541 + /* "ssh/session.pyx":540 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10255,7 +10211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":551 +/* "ssh/session.pyx":550 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10289,7 +10245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_clientbanner", 0); - /* "ssh/session.pyx":554 + /* "ssh/session.pyx":553 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10304,7 +10260,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":555 + /* "ssh/session.pyx":554 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) # <<<<<<<<<<<<<< @@ -10314,7 +10270,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_v__banner = ssh_get_clientbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":554 + /* "ssh/session.pyx":553 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10333,7 +10289,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py } } - /* "ssh/session.pyx":556 + /* "ssh/session.pyx":555 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10343,7 +10299,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":557 + /* "ssh/session.pyx":556 * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10354,7 +10310,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":556 + /* "ssh/session.pyx":555 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10363,19 +10319,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py */ } - /* "ssh/session.pyx":558 + /* "ssh/session.pyx":557 * 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, 558, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":559 + /* "ssh/session.pyx":558 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10387,7 +10343,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":551 + /* "ssh/session.pyx":550 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10407,7 +10363,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":561 +/* "ssh/session.pyx":560 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10441,7 +10397,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_serverbanner", 0); - /* "ssh/session.pyx":564 + /* "ssh/session.pyx":563 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10456,7 +10412,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":565 + /* "ssh/session.pyx":564 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) # <<<<<<<<<<<<<< @@ -10466,7 +10422,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_v__banner = ssh_get_serverbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":564 + /* "ssh/session.pyx":563 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10485,7 +10441,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py } } - /* "ssh/session.pyx":566 + /* "ssh/session.pyx":565 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10495,7 +10451,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":567 + /* "ssh/session.pyx":566 * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10506,7 +10462,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":566 + /* "ssh/session.pyx":565 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10515,19 +10471,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py */ } - /* "ssh/session.pyx":568 + /* "ssh/session.pyx":567 * 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, 568, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":569 + /* "ssh/session.pyx":568 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10539,7 +10495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":561 + /* "ssh/session.pyx":560 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10559,7 +10515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":571 +/* "ssh/session.pyx":570 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10593,7 +10549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_kex_algo", 0); - /* "ssh/session.pyx":574 + /* "ssh/session.pyx":573 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10608,7 +10564,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":575 + /* "ssh/session.pyx":574 * cdef bytes algo * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) # <<<<<<<<<<<<<< @@ -10618,7 +10574,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_v__algo = ssh_get_kex_algo(__pyx_v_self->_session); } - /* "ssh/session.pyx":574 + /* "ssh/session.pyx":573 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10637,7 +10593,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob } } - /* "ssh/session.pyx":576 + /* "ssh/session.pyx":575 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10647,7 +10603,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_t_1 = ((__pyx_v__algo == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":577 + /* "ssh/session.pyx":576 * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: * return # <<<<<<<<<<<<<< @@ -10658,7 +10614,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":576 + /* "ssh/session.pyx":575 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10667,19 +10623,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob */ } - /* "ssh/session.pyx":578 + /* "ssh/session.pyx":577 * 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, 578, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_algo = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":579 + /* "ssh/session.pyx":578 * return * algo = _algo * return algo # <<<<<<<<<<<<<< @@ -10691,7 +10647,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = __pyx_v_algo; goto __pyx_L0; - /* "ssh/session.pyx":571 + /* "ssh/session.pyx":570 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10711,7 +10667,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":581 +/* "ssh/session.pyx":580 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10745,7 +10701,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_in", 0); - /* "ssh/session.pyx":584 + /* "ssh/session.pyx":583 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10760,7 +10716,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":585 + /* "ssh/session.pyx":584 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) # <<<<<<<<<<<<<< @@ -10770,7 +10726,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_v__cipher = ssh_get_cipher_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":584 + /* "ssh/session.pyx":583 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10789,7 +10745,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o } } - /* "ssh/session.pyx":586 + /* "ssh/session.pyx":585 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10799,7 +10755,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":587 + /* "ssh/session.pyx":586 * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10810,7 +10766,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":586 + /* "ssh/session.pyx":585 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10819,19 +10775,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o */ } - /* "ssh/session.pyx":588 + /* "ssh/session.pyx":587 * 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, 588, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":589 + /* "ssh/session.pyx":588 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10843,7 +10799,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":581 + /* "ssh/session.pyx":580 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10863,7 +10819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":591 +/* "ssh/session.pyx":590 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -10897,7 +10853,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_out", 0); - /* "ssh/session.pyx":594 + /* "ssh/session.pyx":593 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10912,7 +10868,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":595 + /* "ssh/session.pyx":594 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) # <<<<<<<<<<<<<< @@ -10922,7 +10878,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_v__cipher = ssh_get_cipher_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":594 + /* "ssh/session.pyx":593 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10941,7 +10897,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ } } - /* "ssh/session.pyx":596 + /* "ssh/session.pyx":595 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10951,7 +10907,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":597 + /* "ssh/session.pyx":596 * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10962,7 +10918,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":596 + /* "ssh/session.pyx":595 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10971,19 +10927,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ */ } - /* "ssh/session.pyx":598 + /* "ssh/session.pyx":597 * 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, 598, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":599 + /* "ssh/session.pyx":598 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10995,7 +10951,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":591 + /* "ssh/session.pyx":590 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -11015,7 +10971,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":601 +/* "ssh/session.pyx":600 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11049,7 +11005,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_in", 0); - /* "ssh/session.pyx":604 + /* "ssh/session.pyx":603 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11064,7 +11020,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":605 + /* "ssh/session.pyx":604 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) # <<<<<<<<<<<<<< @@ -11074,7 +11030,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_v__hmac = ssh_get_hmac_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":604 + /* "ssh/session.pyx":603 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11093,7 +11049,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj } } - /* "ssh/session.pyx":606 + /* "ssh/session.pyx":605 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11103,7 +11059,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":607 + /* "ssh/session.pyx":606 * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11114,7 +11070,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":606 + /* "ssh/session.pyx":605 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11123,19 +11079,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj */ } - /* "ssh/session.pyx":608 + /* "ssh/session.pyx":607 * 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, 608, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":609 + /* "ssh/session.pyx":608 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11147,7 +11103,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":601 + /* "ssh/session.pyx":600 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11167,7 +11123,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":611 +/* "ssh/session.pyx":610 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11201,7 +11157,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_out", 0); - /* "ssh/session.pyx":614 + /* "ssh/session.pyx":613 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11216,7 +11172,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":615 + /* "ssh/session.pyx":614 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) # <<<<<<<<<<<<<< @@ -11226,7 +11182,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_v__hmac = ssh_get_hmac_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":614 + /* "ssh/session.pyx":613 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11245,7 +11201,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob } } - /* "ssh/session.pyx":616 + /* "ssh/session.pyx":615 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11255,7 +11211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":617 + /* "ssh/session.pyx":616 * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11266,7 +11222,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":616 + /* "ssh/session.pyx":615 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11275,19 +11231,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob */ } - /* "ssh/session.pyx":618 + /* "ssh/session.pyx":617 * 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, 618, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":619 + /* "ssh/session.pyx":618 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11299,7 +11255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":611 + /* "ssh/session.pyx":610 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11319,7 +11275,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":621 +/* "ssh/session.pyx":620 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11354,7 +11310,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error", 0); - /* "ssh/session.pyx":624 + /* "ssh/session.pyx":623 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11369,7 +11325,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":625 + /* "ssh/session.pyx":624 * cdef bytes b_error * with nogil: * error = c_ssh.ssh_get_error(self._session) # <<<<<<<<<<<<<< @@ -11379,7 +11335,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_v_error = ssh_get_error(__pyx_v_self->_session); } - /* "ssh/session.pyx":624 + /* "ssh/session.pyx":623 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11398,7 +11354,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 } } - /* "ssh/session.pyx":626 + /* "ssh/session.pyx":625 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11408,7 +11364,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v_error == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":627 + /* "ssh/session.pyx":626 * error = c_ssh.ssh_get_error(self._session) * if error is NULL: * return # <<<<<<<<<<<<<< @@ -11419,7 +11375,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":626 + /* "ssh/session.pyx":625 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11428,19 +11384,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 */ } - /* "ssh/session.pyx":628 + /* "ssh/session.pyx":627 * 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, 628, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_error = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":629 + /* "ssh/session.pyx":628 * return * b_error = error * return to_str(b_error) # <<<<<<<<<<<<<< @@ -11448,14 +11404,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_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, 629, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":621 + /* "ssh/session.pyx":620 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11475,7 +11431,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":631 +/* "ssh/session.pyx":630 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11507,7 +11463,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_code", 0); - /* "ssh/session.pyx":633 + /* "ssh/session.pyx":632 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11522,7 +11478,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":634 + /* "ssh/session.pyx":633 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) # <<<<<<<<<<<<<< @@ -11532,7 +11488,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ __pyx_v_rc = ssh_get_error_code(__pyx_v_self->_session); } - /* "ssh/session.pyx":633 + /* "ssh/session.pyx":632 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11551,7 +11507,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ } } - /* "ssh/session.pyx":635 + /* "ssh/session.pyx":634 * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) * return rc # <<<<<<<<<<<<<< @@ -11559,13 +11515,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_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, 635, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":631 + /* "ssh/session.pyx":630 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11584,7 +11540,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":637 +/* "ssh/session.pyx":636 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -11627,11 +11583,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_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, 637, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 636, __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, 637, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 636, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11639,19 +11595,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_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, 637, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 636, __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, 637, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __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, 637, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 636, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_140scp_new(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_mode, __pyx_v_location); @@ -11679,19 +11635,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scp_new", 0); - /* "ssh/session.pyx":640 + /* "ssh/session.pyx":639 * """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, 640, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_location = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":640 * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location # <<<<<<<<<<<<<< @@ -11700,12 +11656,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_location == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 641, __pyx_L1_error) + __PYX_ERR(0, 640, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error) __pyx_v_c_location = __pyx_t_2; - /* "ssh/session.pyx":642 + /* "ssh/session.pyx":641 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11720,7 +11676,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":643 + /* "ssh/session.pyx":642 * cdef char *c_location = b_location * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) # <<<<<<<<<<<<<< @@ -11729,7 +11685,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_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":644 + /* "ssh/session.pyx":643 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11739,7 +11695,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((__pyx_v__scp == NULL) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":644 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11752,7 +11708,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":645 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11761,30 +11717,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":646 * 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, 646, __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, 645, __pyx_L8_error) - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":645 * 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, 646, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":644 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11807,7 +11763,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":644 + /* "ssh/session.pyx":643 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11816,7 +11772,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":648 + /* "ssh/session.pyx":647 * 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: # <<<<<<<<<<<<<< @@ -11826,7 +11782,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((ssh_scp_init(__pyx_v__scp) != SSH_OK) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":649 + /* "ssh/session.pyx":648 * 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) # <<<<<<<<<<<<<< @@ -11835,7 +11791,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ ssh_scp_free(__pyx_v__scp); - /* "ssh/session.pyx":650 + /* "ssh/session.pyx":649 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11848,7 +11804,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":651 + /* "ssh/session.pyx":650 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11857,29 +11813,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":652 + /* "ssh/session.pyx":651 * 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, 651, __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, 650, __pyx_L12_error) - /* "ssh/session.pyx":651 + /* "ssh/session.pyx":650 * 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, 651, __pyx_L12_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_return; } - /* "ssh/session.pyx":650 + /* "ssh/session.pyx":649 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11902,7 +11858,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":648 + /* "ssh/session.pyx":647 * 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: # <<<<<<<<<<<<<< @@ -11912,7 +11868,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":642 + /* "ssh/session.pyx":641 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11945,19 +11901,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":653 + /* "ssh/session.pyx":652 * 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, 653, __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, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":637 + /* "ssh/session.pyx":636 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -12436,7 +12392,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, 223, __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_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) return 0; __pyx_L1_error:; diff --git a/ssh/session.pyx b/ssh/session.pyx index 617f9d53..74cf49e4 100644 --- a/ssh/session.pyx +++ b/ssh/session.pyx @@ -77,11 +77,11 @@ cdef class Session: cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD cdef int rc + self.sock = socket + self._sock = _sock with nogil: rc = c_ssh.ssh_options_set(self._session, fd, &_sock) handle_error_codes(rc, self._session) - self._sock = _sock - self.sock = socket return rc def blocking_flush(self, int timeout): @@ -96,10 +96,9 @@ cdef class Session: with nogil: _check_connected(self._session) _channel = c_ssh.ssh_channel_new(self._session) - if _channel is NULL: - with gil: - return handle_error_codes( - c_ssh.ssh_get_error_code(self._session), 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) return channel From 1e9d21aeb432a880412e4b56278f111fb4899a1b Mon Sep 17 00:00:00 2001 From: Panos Date: Fri, 21 Aug 2020 17:21:45 +0100 Subject: [PATCH 02/11] Updated exception handling for session authentication. Updated tests. Removed unused exceptions. --- ssh/connector.c | 6 +- ssh/exceptions.c | 406 ++++++++++++++++++------------------------ ssh/exceptions.pyx | 8 - ssh/session.c | 42 ++--- ssh/session.pyx | 8 +- ssh/utils.c | 271 +++++----------------------- ssh/utils.pxd | 4 +- ssh/utils.pyx | 15 +- tests/test_channel.py | 14 +- tests/test_session.py | 9 +- 10 files changed, 256 insertions(+), 527 deletions(-) diff --git a/ssh/connector.c b/ssh/connector.c index 1e51543e..19e10691 100644 --- a/ssh/connector.c +++ b/ssh/connector.c @@ -867,13 +867,13 @@ struct __pyx_obj_3ssh_7session_Session { * * cdef class Channel: # <<<<<<<<<<<<<< * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session + * cdef Session _session */ struct __pyx_obj_3ssh_7channel_Channel { PyObject_HEAD struct __pyx_vtabstruct_3ssh_7channel_Channel *__pyx_vtab; ssh_channel _channel; - struct __pyx_obj_3ssh_7session_Session *session; + struct __pyx_obj_3ssh_7session_Session *_session; int closed; }; @@ -913,7 +913,7 @@ struct __pyx_obj_3ssh_9connector_Connector { * * cdef class Channel: # <<<<<<<<<<<<<< * cdef c_ssh.ssh_channel _channel - * cdef readonly Session session + * cdef Session _session */ struct __pyx_vtabstruct_3ssh_7channel_Channel { diff --git a/ssh/exceptions.c b/ssh/exceptions.c index 26cbe1a0..2dbdc418 100644 --- a/ssh/exceptions.c +++ b/ssh/exceptions.c @@ -1057,7 +1057,6 @@ static const char __pyx_k_SSHError[] = "SSHError"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_SFTPError[] = "SFTPError"; static const char __pyx_k_metaclass[] = "__metaclass__"; -static const char __pyx_k_FatalError[] = "FatalError"; static const char __pyx_k_OtherError[] = "OtherError"; static const char __pyx_k_GSSAPIError[] = "GSSAPIError"; static const char __pyx_k_OptionError[] = "OptionError"; @@ -1067,7 +1066,6 @@ static const char __pyx_k_ChannelClosed[] = "ChannelClosed"; static const char __pyx_k_ConnectFailed[] = "ConnectFailed"; static const char __pyx_k_InvalidAPIUse[] = "InvalidAPIUse"; static const char __pyx_k_ProtocolError[] = "ProtocolError"; -static const char __pyx_k_RequestDenied[] = "RequestDenied"; static const char __pyx_k_UnImplemented[] = "UnImplemented"; static const char __pyx_k_ConnectionLost[] = "ConnectionLost"; static const char __pyx_k_GSSAPIErrorTok[] = "GSSAPIErrorTok"; @@ -1109,7 +1107,6 @@ static const char __pyx_k_Raised_on_errors_exporting_key[] = "Raised on errors e static const char __pyx_k_Raised_on_errors_importing_key[] = "Raised on errors importing key"; static const char __pyx_k_Raised_on_unimplemented_errors[] = "Raised on unimplemented errors"; static const char __pyx_k_Raised_on_unknown_channel_type[] = "Raised on unknown channel type"; -static const char __pyx_k_Raised_on_unrecoverable_errors[] = "Raised on unrecoverable errors"; static const char __pyx_k_Raised_on_authentication_denied[] = "Raised on authentication denied errors"; static const char __pyx_k_Raised_on_errors_generating_key[] = "Raised on errors generating key"; static const char __pyx_k_Raised_on_key_exchange_failures[] = "Raised on key exchange failures"; @@ -1128,7 +1125,6 @@ static const char __pyx_k_Raised_on_operations_on_closed_c[] = "Raised on operat static const char __pyx_k_Raised_on_other_non_specific_fat[] = "Raised on other non-specific fatal errors"; static const char __pyx_k_Raised_on_partial_authentication[] = "Raised on partial authentication"; static const char __pyx_k_Raised_on_protocol_version_not_s[] = "Raised on protocol version not supported"; -static const char __pyx_k_Raised_on_request_denied_by_serv[] = "Raised on request denied by server errors"; static const char __pyx_k_Raised_on_resource_shortage_erro[] = "Raised on resource shortage errors"; static const char __pyx_k_Raised_on_too_many_connection_er[] = "Raised on too many connection errors"; static PyObject *__pyx_n_s_AdministrativelyProhibited; @@ -1144,7 +1140,6 @@ static PyObject *__pyx_n_s_ConnectFailed; static PyObject *__pyx_n_s_ConnectionLost; static PyObject *__pyx_n_s_Disconnected; static PyObject *__pyx_n_s_EOF; -static PyObject *__pyx_n_s_FatalError; static PyObject *__pyx_n_s_GSSAPIError; static PyObject *__pyx_n_s_GSSAPIErrorTok; static PyObject *__pyx_n_s_HostAuthenticationFailed; @@ -1190,14 +1185,11 @@ static PyObject *__pyx_kp_s_Raised_on_other_non_specific_fat; static PyObject *__pyx_kp_s_Raised_on_partial_authentication; static PyObject *__pyx_kp_s_Raised_on_protocol_errors; static PyObject *__pyx_kp_s_Raised_on_protocol_version_not_s; -static PyObject *__pyx_kp_s_Raised_on_request_denied_by_serv; static PyObject *__pyx_kp_s_Raised_on_resource_shortage_erro; static PyObject *__pyx_kp_s_Raised_on_service_not_available; static PyObject *__pyx_kp_s_Raised_on_too_many_connection_er; static PyObject *__pyx_kp_s_Raised_on_unimplemented_errors; static PyObject *__pyx_kp_s_Raised_on_unknown_channel_type; -static PyObject *__pyx_kp_s_Raised_on_unrecoverable_errors; -static PyObject *__pyx_n_s_RequestDenied; static PyObject *__pyx_n_s_RequestFailure; static PyObject *__pyx_n_s_ResourceShortage; static PyObject *__pyx_n_s_SFTPError; @@ -1278,7 +1270,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_ConnectionLost, __pyx_k_ConnectionLost, sizeof(__pyx_k_ConnectionLost), 0, 0, 1, 1}, {&__pyx_n_s_Disconnected, __pyx_k_Disconnected, sizeof(__pyx_k_Disconnected), 0, 0, 1, 1}, {&__pyx_n_s_EOF, __pyx_k_EOF, sizeof(__pyx_k_EOF), 0, 0, 1, 1}, - {&__pyx_n_s_FatalError, __pyx_k_FatalError, sizeof(__pyx_k_FatalError), 0, 0, 1, 1}, {&__pyx_n_s_GSSAPIError, __pyx_k_GSSAPIError, sizeof(__pyx_k_GSSAPIError), 0, 0, 1, 1}, {&__pyx_n_s_GSSAPIErrorTok, __pyx_k_GSSAPIErrorTok, sizeof(__pyx_k_GSSAPIErrorTok), 0, 0, 1, 1}, {&__pyx_n_s_HostAuthenticationFailed, __pyx_k_HostAuthenticationFailed, sizeof(__pyx_k_HostAuthenticationFailed), 0, 0, 1, 1}, @@ -1324,14 +1315,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Raised_on_partial_authentication, __pyx_k_Raised_on_partial_authentication, sizeof(__pyx_k_Raised_on_partial_authentication), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_protocol_errors, __pyx_k_Raised_on_protocol_errors, sizeof(__pyx_k_Raised_on_protocol_errors), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_protocol_version_not_s, __pyx_k_Raised_on_protocol_version_not_s, sizeof(__pyx_k_Raised_on_protocol_version_not_s), 0, 0, 1, 0}, - {&__pyx_kp_s_Raised_on_request_denied_by_serv, __pyx_k_Raised_on_request_denied_by_serv, sizeof(__pyx_k_Raised_on_request_denied_by_serv), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_resource_shortage_erro, __pyx_k_Raised_on_resource_shortage_erro, sizeof(__pyx_k_Raised_on_resource_shortage_erro), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_service_not_available, __pyx_k_Raised_on_service_not_available, sizeof(__pyx_k_Raised_on_service_not_available), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_too_many_connection_er, __pyx_k_Raised_on_too_many_connection_er, sizeof(__pyx_k_Raised_on_too_many_connection_er), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_unimplemented_errors, __pyx_k_Raised_on_unimplemented_errors, sizeof(__pyx_k_Raised_on_unimplemented_errors), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_unknown_channel_type, __pyx_k_Raised_on_unknown_channel_type, sizeof(__pyx_k_Raised_on_unknown_channel_type), 0, 0, 1, 0}, - {&__pyx_kp_s_Raised_on_unrecoverable_errors, __pyx_k_Raised_on_unrecoverable_errors, sizeof(__pyx_k_Raised_on_unrecoverable_errors), 0, 0, 1, 0}, - {&__pyx_n_s_RequestDenied, __pyx_k_RequestDenied, sizeof(__pyx_k_RequestDenied), 0, 0, 1, 1}, {&__pyx_n_s_RequestFailure, __pyx_k_RequestFailure, sizeof(__pyx_k_RequestFailure), 0, 0, 1, 1}, {&__pyx_n_s_ResourceShortage, __pyx_k_ResourceShortage, sizeof(__pyx_k_ResourceShortage), 0, 0, 1, 1}, {&__pyx_n_s_SFTPError, __pyx_k_SFTPError, sizeof(__pyx_k_SFTPError), 0, 0, 1, 1}, @@ -1691,8 +1679,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":26 * * - * class RequestDenied(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on request denied by server errors""" + * class OtherError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on other non-specific fatal errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) @@ -1704,11 +1692,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RequestDenied, __pyx_n_s_RequestDenied, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_request_denied_by_serv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OtherError, __pyx_n_s_OtherError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_other_non_specific_fat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RequestDenied, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OtherError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestDenied, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_OtherError, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1717,8 +1705,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":30 * * - * class FatalError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on unrecoverable errors""" + * class AuthenticationDenied(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on authentication denied errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) @@ -1730,11 +1718,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FatalError, __pyx_n_s_FatalError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unrecoverable_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationDenied, __pyx_n_s_AuthenticationDenied, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_authentication_denied); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FatalError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationDenied, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FatalError, __pyx_t_4) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationDenied, __pyx_t_4) < 0) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -1743,8 +1731,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":34 * * - * class OtherError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on other non-specific fatal errors""" + * class AuthenticationError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on fatal errors authenticating""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) @@ -1756,11 +1744,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OtherError, __pyx_n_s_OtherError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_other_non_specific_fat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_AuthenticationError, __pyx_n_s_AuthenticationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_fatal_errors_authentic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OtherError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_AuthenticationError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_OtherError, __pyx_t_4) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationError, __pyx_t_4) < 0) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1769,8 +1757,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":38 * * - * class AuthenticationDenied(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on authentication denied errors""" + * class AuthenticationPartial(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on partial authentication""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) @@ -1782,11 +1770,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationDenied, __pyx_n_s_AuthenticationDenied, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_authentication_denied); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationPartial, __pyx_n_s_AuthenticationPartial, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_partial_authentication); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationDenied, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationPartial, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationDenied, __pyx_t_4) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationPartial, __pyx_t_4) < 0) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -1795,8 +1783,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":42 * * - * class AuthenticationError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on fatal errors authenticating""" + * class KeyExportError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors exporting key""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) @@ -1808,11 +1796,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_AuthenticationError, __pyx_n_s_AuthenticationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_fatal_errors_authentic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExportError, __pyx_n_s_KeyExportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_exporting_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_AuthenticationError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExportError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationError, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExportError, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1821,8 +1809,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":46 * * - * class AuthenticationPartial(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on partial authentication""" + * class KeyImportError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors importing key""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) @@ -1834,11 +1822,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationPartial, __pyx_n_s_AuthenticationPartial, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_partial_authentication); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KeyImportError, __pyx_n_s_KeyImportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_importing_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationPartial, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KeyImportError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationPartial, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyImportError, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -1847,8 +1835,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":50 * * - * class KeyExportError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors exporting key""" + * class KeyGenerationError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors generating key""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) @@ -1860,11 +1848,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExportError, __pyx_n_s_KeyExportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_exporting_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyGenerationError, __pyx_n_s_KeyGenerationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_generating_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExportError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyGenerationError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExportError, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyGenerationError, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1873,8 +1861,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":54 * * - * class KeyImportError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors importing key""" + * class SSHError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors using the libssh API and unknown errors from servers""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) @@ -1886,11 +1874,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KeyImportError, __pyx_n_s_KeyImportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_importing_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SSHError, __pyx_n_s_SSHError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_using_the_libss); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KeyImportError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SSHError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyImportError, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SSHError, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -1899,8 +1887,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":58 * * - * class KeyGenerationError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors generating key""" + * class EOF(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on EOF errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) @@ -1912,11 +1900,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyGenerationError, __pyx_n_s_KeyGenerationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_generating_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EOF, __pyx_n_s_EOF, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_EOF_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyGenerationError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EOF, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyGenerationError, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOF, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1925,8 +1913,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":62 * * - * class SSHError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors using the libssh API and unknown errors from servers""" + * class InvalidAPIUse(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on invalid uses of the API""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) @@ -1938,11 +1926,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SSHError, __pyx_n_s_SSHError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_using_the_libss); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InvalidAPIUse, __pyx_n_s_InvalidAPIUse, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_invalid_uses_of_the_AP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SSHError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidAPIUse, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SSHError, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidAPIUse, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -1951,8 +1939,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":66 * * - * class EOF(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on EOF errors""" + * class Disconnected(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on disconnection errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) @@ -1964,11 +1952,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EOF, __pyx_n_s_EOF, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_EOF_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Disconnected, __pyx_n_s_Disconnected, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_disconnection_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EOF, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Disconnected, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOF, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Disconnected, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1977,8 +1965,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":70 * * - * class InvalidAPIUse(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on invalid uses of the API""" + * class UnImplemented(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on unimplemented errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) @@ -1990,11 +1978,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InvalidAPIUse, __pyx_n_s_InvalidAPIUse, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_invalid_uses_of_the_AP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnImplemented, __pyx_n_s_UnImplemented, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unimplemented_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidAPIUse, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnImplemented, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidAPIUse, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnImplemented, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2003,8 +1991,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":74 * * - * class Disconnected(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on disconnection errors""" + * class GSSAPIError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on GSS API errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) @@ -2016,11 +2004,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Disconnected, __pyx_n_s_Disconnected, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_disconnection_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_GSSAPIError, __pyx_n_s_GSSAPIError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Disconnected, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_GSSAPIError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Disconnected, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIError, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2029,8 +2017,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":78 * * - * class UnImplemented(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on unimplemented errors""" + * class GSSAPIErrorTok(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on GSS API token errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) @@ -2042,11 +2030,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnImplemented, __pyx_n_s_UnImplemented, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unimplemented_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GSSAPIErrorTok, __pyx_n_s_GSSAPIErrorTok, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_token_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnImplemented, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GSSAPIErrorTok, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnImplemented, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIErrorTok, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2055,8 +2043,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":82 * * - * class GSSAPIError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on GSS API errors""" + * class RequestFailure(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on SSH request failures""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) @@ -2068,11 +2056,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_GSSAPIError, __pyx_n_s_GSSAPIError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RequestFailure, __pyx_n_s_RequestFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_request_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_GSSAPIError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RequestFailure, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIError, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestFailure, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2081,8 +2069,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":86 * * - * class GSSAPIErrorTok(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on GSS API token errors""" + * class ChannelOpenFailure(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on SSH channel open failures""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) @@ -2094,11 +2082,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GSSAPIErrorTok, __pyx_n_s_GSSAPIErrorTok, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_token_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelOpenFailure, __pyx_n_s_ChannelOpenFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_channel_open_failu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GSSAPIErrorTok, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelOpenFailure, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIErrorTok, __pyx_t_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelOpenFailure, __pyx_t_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2107,8 +2095,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":90 * * - * class RequestFailure(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on SSH request failures""" + * class HostNotAllowedToConnect(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on host not allowed to connect errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) @@ -2120,11 +2108,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RequestFailure, __pyx_n_s_RequestFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_request_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostNotAllowedToConnect, __pyx_n_s_HostNotAllowedToConnect, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_not_allowed_to_co); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RequestFailure, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestFailure, __pyx_t_4) < 0) __PYX_ERR(0, 90, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_4) < 0) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2133,8 +2121,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":94 * * - * class ChannelOpenFailure(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on SSH channel open failures""" + * class ProtocolError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on protocol errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) @@ -2146,11 +2134,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelOpenFailure, __pyx_n_s_ChannelOpenFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_channel_open_failu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolError, __pyx_n_s_ProtocolError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelOpenFailure, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelOpenFailure, __pyx_t_4) < 0) __PYX_ERR(0, 94, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolError, __pyx_t_4) < 0) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2159,8 +2147,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":98 * * - * class HostNotAllowedToConnect(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on host not allowed to connect errors""" + * class KeyExchangeFailed(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on key exchange failures""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) @@ -2172,11 +2160,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostNotAllowedToConnect, __pyx_n_s_HostNotAllowedToConnect, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_not_allowed_to_co); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExchangeFailed, __pyx_n_s_KeyExchangeFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_key_exchange_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExchangeFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExchangeFailed, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2185,8 +2173,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":102 * * - * class ProtocolError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on protocol errors""" + * class HostAuthenticationFailed(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on host authentication failures""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) @@ -2198,11 +2186,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolError, __pyx_n_s_ProtocolError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HostAuthenticationFailed, __pyx_n_s_HostAuthenticationFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_authentication_fa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HostAuthenticationFailed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolError, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostAuthenticationFailed, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2211,8 +2199,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":106 * * - * class KeyExchangeFailed(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on key exchange failures""" + * class MACError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on MAC errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) @@ -2224,11 +2212,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExchangeFailed, __pyx_n_s_KeyExchangeFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_key_exchange_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MACError, __pyx_n_s_MACError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_MAC_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExchangeFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MACError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExchangeFailed, __pyx_t_4) < 0) __PYX_ERR(0, 106, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MACError, __pyx_t_4) < 0) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2237,8 +2225,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":110 * * - * class HostAuthenticationFailed(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on host authentication failures""" + * class CompressionError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on compression errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) @@ -2250,11 +2238,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HostAuthenticationFailed, __pyx_n_s_HostAuthenticationFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_authentication_fa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CompressionError, __pyx_n_s_CompressionError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_compression_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HostAuthenticationFailed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CompressionError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostAuthenticationFailed, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompressionError, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2263,8 +2251,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":114 * * - * class MACError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on MAC errors""" + * class ServiceNotAvailable(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on service not available errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) @@ -2276,11 +2264,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MACError, __pyx_n_s_MACError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_MAC_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ServiceNotAvailable, __pyx_n_s_ServiceNotAvailable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_service_not_available); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MACError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ServiceNotAvailable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MACError, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ServiceNotAvailable, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2289,8 +2277,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":118 * * - * class CompressionError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on compression errors""" + * class ProtocolVersionNotSupport(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on protocol version not supported""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) @@ -2302,11 +2290,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CompressionError, __pyx_n_s_CompressionError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_compression_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolVersionNotSupport, __pyx_n_s_ProtocolVersionNotSupport, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_version_not_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CompressionError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompressionError, __pyx_t_4) < 0) __PYX_ERR(0, 118, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_4) < 0) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2315,8 +2303,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":122 * * - * class ServiceNotAvailable(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on service not available errors""" + * class HostKeyNotVerifiable(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on host key not verifiable errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) @@ -2328,11 +2316,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ServiceNotAvailable, __pyx_n_s_ServiceNotAvailable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_service_not_available); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostKeyNotVerifiable, __pyx_n_s_HostKeyNotVerifiable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_key_not_verifiabl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ServiceNotAvailable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ServiceNotAvailable, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2341,8 +2329,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":126 * * - * class ProtocolVersionNotSupport(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on protocol version not supported""" + * class ConnectionLost(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on connection lost""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) @@ -2354,11 +2342,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolVersionNotSupport, __pyx_n_s_ProtocolVersionNotSupport, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_version_not_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ConnectionLost, __pyx_n_s_ConnectionLost, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connection_lost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ConnectionLost, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_4) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectionLost, __pyx_t_4) < 0) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2367,8 +2355,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":130 * * - * class HostKeyNotVerifiable(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on host key not verifiable errors""" + * class TooManyConnections(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on too many connection errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) @@ -2380,11 +2368,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostKeyNotVerifiable, __pyx_n_s_HostKeyNotVerifiable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_key_not_verifiabl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TooManyConnections, __pyx_n_s_TooManyConnections, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_too_many_connection_er); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TooManyConnections, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_4) < 0) __PYX_ERR(0, 130, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TooManyConnections, __pyx_t_4) < 0) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2393,8 +2381,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":134 * * - * class ConnectionLost(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on connection lost""" + * class AdministrativelyProhibited(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on administratively prohibited errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) @@ -2406,11 +2394,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ConnectionLost, __pyx_n_s_ConnectionLost, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connection_lost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AdministrativelyProhibited, __pyx_n_s_AdministrativelyProhibited, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_administratively_prohi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ConnectionLost, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AdministrativelyProhibited, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectionLost, __pyx_t_4) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AdministrativelyProhibited, __pyx_t_4) < 0) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2419,8 +2407,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":138 * * - * class TooManyConnections(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on too many connection errors""" + * class ConnectFailed(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on connect failure""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) @@ -2432,11 +2420,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TooManyConnections, __pyx_n_s_TooManyConnections, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_too_many_connection_er); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ConnectFailed, __pyx_n_s_ConnectFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connect_failure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TooManyConnections, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ConnectFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TooManyConnections, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectFailed, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2445,8 +2433,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":142 * * - * class AdministrativelyProhibited(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on administratively prohibited errors""" + * class UnknownChannelType(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on unknown channel type""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) @@ -2458,11 +2446,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AdministrativelyProhibited, __pyx_n_s_AdministrativelyProhibited, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_administratively_prohi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnknownChannelType, __pyx_n_s_UnknownChannelType, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unknown_channel_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AdministrativelyProhibited, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnknownChannelType, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AdministrativelyProhibited, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnknownChannelType, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2471,8 +2459,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":146 * * - * class ConnectFailed(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on connect failure""" + * class ResourceShortage(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on resource shortage errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) @@ -2484,11 +2472,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ConnectFailed, __pyx_n_s_ConnectFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connect_failure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ResourceShortage, __pyx_n_s_ResourceShortage, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_resource_shortage_erro); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ConnectFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ResourceShortage, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectFailed, __pyx_t_4) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ResourceShortage, __pyx_t_4) < 0) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2497,8 +2485,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":150 * * - * class UnknownChannelType(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on unknown channel type""" + * class SFTPError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on SFTP errors""" * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) @@ -2510,11 +2498,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnknownChannelType, __pyx_n_s_UnknownChannelType, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unknown_channel_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SFTPError, __pyx_n_s_SFTPError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnknownChannelType, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SFTPError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnknownChannelType, __pyx_t_4) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPError, __pyx_t_4) < 0) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2523,11 +2511,11 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":154 * * - * class ResourceShortage(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on resource shortage errors""" + * class SFTPHandleError(SFTPError): # <<<<<<<<<<<<<< + * """Raised on SFTP handle errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SFTPError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -2536,11 +2524,11 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ResourceShortage, __pyx_n_s_ResourceShortage, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_resource_shortage_erro); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SFTPHandleError, __pyx_n_s_SFTPHandleError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_handle_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ResourceShortage, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SFTPHandleError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ResourceShortage, __pyx_t_4) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPHandleError, __pyx_t_4) < 0) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2549,9 +2537,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":158 * * - * class SFTPError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on SFTP errors""" - * + * class ChannelClosed(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on operations on closed channels""" */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -2562,62 +2549,11 @@ if (!__Pyx_RefNanny) { __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SFTPError, __pyx_n_s_SFTPError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SFTPError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPError, __pyx_t_4) < 0) __PYX_ERR(0, 158, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "ssh/exceptions.pyx":162 - * - * - * class SFTPHandleError(SFTPError): # <<<<<<<<<<<<<< - * """Raised on SFTP handle errors""" - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SFTPError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SFTPHandleError, __pyx_n_s_SFTPHandleError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_handle_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SFTPHandleError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPHandleError, __pyx_t_4) < 0) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "ssh/exceptions.pyx":166 - * - * - * class ChannelClosed(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on operations on closed channels""" - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelClosed, __pyx_n_s_ChannelClosed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_operations_on_closed_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelClosed, __pyx_n_s_ChannelClosed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_operations_on_closed_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelClosed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelClosed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelClosed, __pyx_t_4) < 0) __PYX_ERR(0, 166, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelClosed, __pyx_t_4) < 0) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; diff --git a/ssh/exceptions.pyx b/ssh/exceptions.pyx index e173d0df..5da1c80f 100644 --- a/ssh/exceptions.pyx +++ b/ssh/exceptions.pyx @@ -23,14 +23,6 @@ class BaseSSHError(Exception): """Base class for all errors produced by libssh""" -class RequestDenied(BaseSSHError): - """Raised on request denied by server errors""" - - -class FatalError(BaseSSHError): - """Raised on unrecoverable errors""" - - class OtherError(BaseSSHError): """Raised on other non-specific fatal errors""" diff --git a/ssh/session.c b/ssh/session.c index f527f6db..40258720 100644 --- a/ssh/session.c +++ b/ssh/session.c @@ -7431,7 +7431,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_none(self._session, NULL) - * return handle_error_codes(rc, 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, 392, __pyx_L4_error) @@ -7439,7 +7439,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) # <<<<<<<<<<<<<< - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * */ __pyx_v_rc = ssh_userauth_none(__pyx_v_self->_session, NULL); @@ -7474,12 +7474,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob /* "ssh/session.pyx":394 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) - * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< + * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< * * def userauth_list(self): */ __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, 394, __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, 394, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; @@ -7506,7 +7506,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob } /* "ssh/session.pyx":396 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< * cdef int rc @@ -7615,7 +7615,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob goto __pyx_L0; /* "ssh/session.pyx":396 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< * cdef int rc @@ -8175,7 +8175,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey_auto( # <<<<<<<<<<<<<< * self._session, NULL, c_passphrase) - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) */ __pyx_v_rc = ssh_userauth_publickey_auto(__pyx_v_self->_session, NULL, __pyx_v_c_passphrase); } @@ -8209,12 +8209,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc /* "ssh/session.pyx":438 * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) - * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< + * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< * * def userauth_password(self, username not None, password not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 438, __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, 438, __pyx_L1_error) __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; @@ -8242,7 +8242,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc } /* "ssh/session.pyx":440 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< * cdef bytes b_username = to_bytes(username) @@ -8422,7 +8422,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py * _check_connected(self._session) * rc = c_ssh.ssh_userauth_password( # <<<<<<<<<<<<<< * self._session, c_username, c_password) - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) */ __pyx_v_rc = ssh_userauth_password(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_password); } @@ -8456,12 +8456,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py /* "ssh/session.pyx":450 * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) - * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< + * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< * * def userauth_kbdint(self, username not None, submethods not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 450, __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, 450, __pyx_L1_error) __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; @@ -8469,7 +8469,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py goto __pyx_L0; /* "ssh/session.pyx":440 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< * cdef bytes b_username = to_bytes(username) @@ -8490,7 +8490,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py } /* "ssh/session.pyx":452 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< * cdef bytes b_username = to_bytes(username) @@ -8670,7 +8670,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint( # <<<<<<<<<<<<<< * self._session, c_username, c_submethods) - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) */ __pyx_v_rc = ssh_userauth_kbdint(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_submethods); } @@ -8704,12 +8704,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx /* "ssh/session.pyx":462 * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) - * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< + * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< * * def userauth_kbdint_getinstruction(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 462, __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, 462, __pyx_L1_error) __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; @@ -8717,7 +8717,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx goto __pyx_L0; /* "ssh/session.pyx":452 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< * cdef bytes b_username = to_bytes(username) @@ -8738,7 +8738,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx } /* "ssh/session.pyx":464 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< * cdef bytes b_instruction @@ -8857,7 +8857,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi goto __pyx_L0; /* "ssh/session.pyx":464 - * return handle_error_codes(rc, self._session) + * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< * cdef bytes b_instruction diff --git a/ssh/session.pyx b/ssh/session.pyx index 74cf49e4..97c6e131 100644 --- a/ssh/session.pyx +++ b/ssh/session.pyx @@ -391,7 +391,7 @@ cdef class Session: with nogil: _check_connected(self._session) rc = c_ssh.ssh_userauth_none(self._session, NULL) - return handle_error_codes(rc, self._session) + return handle_auth_error_codes(rc, self._session) def userauth_list(self): cdef int rc @@ -435,7 +435,7 @@ cdef class Session: _check_connected(self._session) rc = c_ssh.ssh_userauth_publickey_auto( self._session, NULL, c_passphrase) - return handle_error_codes(rc, self._session) + return handle_auth_error_codes(rc, self._session) def userauth_password(self, username not None, password not None): cdef bytes b_username = to_bytes(username) @@ -447,7 +447,7 @@ cdef class Session: _check_connected(self._session) rc = c_ssh.ssh_userauth_password( self._session, c_username, c_password) - return handle_error_codes(rc, self._session) + return handle_auth_error_codes(rc, self._session) def userauth_kbdint(self, username not None, submethods not None): cdef bytes b_username = to_bytes(username) @@ -459,7 +459,7 @@ cdef class Session: _check_connected(self._session) rc = c_ssh.ssh_userauth_kbdint( self._session, c_username, c_submethods) - return handle_error_codes(rc, self._session) + return handle_auth_error_codes(rc, self._session) def userauth_kbdint_getinstruction(self): cdef bytes b_instruction diff --git a/ssh/utils.c b/ssh/utils.c index 7ebfb838..488fa012 100644 --- a/ssh/utils.c +++ b/ssh/utils.c @@ -1177,7 +1177,6 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cpython.version' */ /* Module declarations from 'ssh.utils' */ -static int __pyx_f_3ssh_5utils__handle_general_error_codes(int, ssh_session); /*proto*/ static int __pyx_f_3ssh_5utils_handle_error_codes(int, ssh_session); /*proto*/ #define __Pyx_MODULE_NAME "ssh.utils" extern int __pyx_module_is_main_ssh__utils; @@ -1202,13 +1201,11 @@ static const char __pyx_k_ENCODING[] = "ENCODING"; static const char __pyx_k_SSHError[] = "SSHError"; static const char __pyx_k_writefds[] = "writefds"; static const char __pyx_k_ssh_utils[] = "ssh.utils"; -static const char __pyx_k_FatalError[] = "FatalError"; static const char __pyx_k_OtherError[] = "OtherError"; static const char __pyx_k_directions[] = "directions"; static const char __pyx_k_exceptions[] = "exceptions"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_wait_socket[] = "wait_socket"; -static const char __pyx_k_RequestDenied[] = "RequestDenied"; static const char __pyx_k_ssh_utils_pyx[] = "ssh/utils.pyx"; static const char __pyx_k_get_poll_flags[] = "get_poll_flags"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; @@ -1220,10 +1217,8 @@ static PyObject *__pyx_n_s_AuthenticationError; static PyObject *__pyx_n_s_AuthenticationPartial; static PyObject *__pyx_n_s_ENCODING; static PyObject *__pyx_n_s_EOF; -static PyObject *__pyx_n_s_FatalError; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_n_s_OtherError; -static PyObject *__pyx_n_s_RequestDenied; static PyObject *__pyx_n_s_SSHError; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_decode; @@ -2243,12 +2238,12 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ /* "ssh/utils.pyx":84 * * - * cdef int _handle_general_error_codes( # <<<<<<<<<<<<<< + * cdef int handle_error_codes( # <<<<<<<<<<<<<< * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: */ -static int __pyx_f_3ssh_5utils__handle_general_error_codes(int __pyx_v_errcode, ssh_session __pyx_v_session) { +static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_session __pyx_v_session) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -2262,10 +2257,10 @@ static int __pyx_f_3ssh_5utils__handle_general_error_codes(int __pyx_v_errcode, int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_handle_general_error_codes", 0); + __Pyx_RefNannySetupContext("handle_error_codes", 0); /* "ssh/utils.pyx":86 - * cdef int _handle_general_error_codes( + * cdef int handle_error_codes( * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: # <<<<<<<<<<<<<< * return SSH_OK @@ -2285,7 +2280,7 @@ static int __pyx_f_3ssh_5utils__handle_general_error_codes(int __pyx_v_errcode, goto __pyx_L0; /* "ssh/utils.pyx":86 - * cdef int _handle_general_error_codes( + * cdef int handle_error_codes( * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: # <<<<<<<<<<<<<< * return SSH_OK @@ -2496,7 +2491,7 @@ static int __pyx_f_3ssh_5utils__handle_general_error_codes(int __pyx_v_errcode, /* "ssh/utils.pyx":84 * * - * cdef int _handle_general_error_codes( # <<<<<<<<<<<<<< + * cdef int handle_error_codes( # <<<<<<<<<<<<<< * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: */ @@ -2509,173 +2504,6 @@ static int __pyx_f_3ssh_5utils__handle_general_error_codes(int __pyx_v_errcode, __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("ssh.utils._handle_general_error_codes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh/utils.pyx":100 - * - * - * cdef int handle_error_codes(int errcode, ssh_session session) except -1: # <<<<<<<<<<<<<< - * if errcode == ssh_error_types_e.SSH_NO_ERROR: - * return 0 - */ - -static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_session __pyx_v_session) { - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("handle_error_codes", 0); - - /* "ssh/utils.pyx":101 - * - * cdef int handle_error_codes(int errcode, ssh_session session) except -1: - * if errcode == ssh_error_types_e.SSH_NO_ERROR: # <<<<<<<<<<<<<< - * return 0 - * elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: - */ - switch (__pyx_v_errcode) { - case SSH_NO_ERROR: - - /* "ssh/utils.pyx":102 - * cdef int handle_error_codes(int errcode, ssh_session session) except -1: - * if errcode == ssh_error_types_e.SSH_NO_ERROR: - * return 0 # <<<<<<<<<<<<<< - * elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: - * raise RequestDenied(ssh_get_error(session)) - */ - __pyx_r = 0; - goto __pyx_L0; - - /* "ssh/utils.pyx":101 - * - * cdef int handle_error_codes(int errcode, ssh_session session) except -1: - * if errcode == ssh_error_types_e.SSH_NO_ERROR: # <<<<<<<<<<<<<< - * return 0 - * elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: - */ - break; - case SSH_REQUEST_DENIED: - - /* "ssh/utils.pyx":104 - * return 0 - * elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: - * raise RequestDenied(ssh_get_error(session)) # <<<<<<<<<<<<<< - * elif errcode == ssh_error_types_e.SSH_FATAL: - * raise FatalError(ssh_get_error(session)) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RequestDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 104, __pyx_L1_error) - - /* "ssh/utils.pyx":103 - * if errcode == ssh_error_types_e.SSH_NO_ERROR: - * return 0 - * elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: # <<<<<<<<<<<<<< - * raise RequestDenied(ssh_get_error(session)) - * elif errcode == ssh_error_types_e.SSH_FATAL: - */ - break; - case SSH_FATAL: - - /* "ssh/utils.pyx":106 - * raise RequestDenied(ssh_get_error(session)) - * elif errcode == ssh_error_types_e.SSH_FATAL: - * raise FatalError(ssh_get_error(session)) # <<<<<<<<<<<<<< - * else: - * return _handle_general_error_codes(errcode, session) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FatalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 106, __pyx_L1_error) - - /* "ssh/utils.pyx":105 - * elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: - * raise RequestDenied(ssh_get_error(session)) - * elif errcode == ssh_error_types_e.SSH_FATAL: # <<<<<<<<<<<<<< - * raise FatalError(ssh_get_error(session)) - * else: - */ - break; - default: - - /* "ssh/utils.pyx":108 - * raise FatalError(ssh_get_error(session)) - * else: - * return _handle_general_error_codes(errcode, session) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_5 = __pyx_f_3ssh_5utils__handle_general_error_codes(__pyx_v_errcode, __pyx_v_session); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 108, __pyx_L1_error) - __pyx_r = __pyx_t_5; - goto __pyx_L0; - break; - } - - /* "ssh/utils.pyx":100 - * - * - * cdef int handle_error_codes(int errcode, ssh_session session) except -1: # <<<<<<<<<<<<<< - * if errcode == ssh_error_types_e.SSH_NO_ERROR: - * return 0 - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("ssh.utils.handle_error_codes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -2683,7 +2511,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi return __pyx_r; } -/* "ssh/utils.pyx":111 +/* "ssh/utils.pyx":100 * * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: # <<<<<<<<<<<<<< @@ -2704,7 +2532,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_auth_error_codes", 0); - /* "ssh/utils.pyx":112 + /* "ssh/utils.pyx":101 * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: # <<<<<<<<<<<<<< @@ -2714,7 +2542,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ switch (__pyx_v_errcode) { case SSH_AUTH_SUCCESS: - /* "ssh/utils.pyx":113 + /* "ssh/utils.pyx":102 * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: * return ssh_auth_e.SSH_AUTH_SUCCESS # <<<<<<<<<<<<<< @@ -2724,7 +2552,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_r = SSH_AUTH_SUCCESS; goto __pyx_L0; - /* "ssh/utils.pyx":112 + /* "ssh/utils.pyx":101 * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: # <<<<<<<<<<<<<< @@ -2734,16 +2562,16 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_DENIED: - /* "ssh/utils.pyx":115 + /* "ssh/utils.pyx":104 * return ssh_auth_e.SSH_AUTH_SUCCESS * elif errcode == ssh_auth_e.SSH_AUTH_DENIED: * raise AuthenticationDenied(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: * raise AuthenticationError(ssh_get_error(session)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2758,14 +2586,14 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 115, __pyx_L1_error) + __PYX_ERR(0, 104, __pyx_L1_error) - /* "ssh/utils.pyx":114 + /* "ssh/utils.pyx":103 * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: * return ssh_auth_e.SSH_AUTH_SUCCESS * elif errcode == ssh_auth_e.SSH_AUTH_DENIED: # <<<<<<<<<<<<<< @@ -2775,16 +2603,16 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_ERROR: - /* "ssh/utils.pyx":117 + /* "ssh/utils.pyx":106 * raise AuthenticationDenied(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: * raise AuthenticationError(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: * raise AuthenticationPartial(ssh_get_error(session)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2799,14 +2627,14 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 117, __pyx_L1_error) + __PYX_ERR(0, 106, __pyx_L1_error) - /* "ssh/utils.pyx":116 + /* "ssh/utils.pyx":105 * elif errcode == ssh_auth_e.SSH_AUTH_DENIED: * raise AuthenticationDenied(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: # <<<<<<<<<<<<<< @@ -2816,16 +2644,16 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_PARTIAL: - /* "ssh/utils.pyx":119 + /* "ssh/utils.pyx":108 * raise AuthenticationError(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: * raise AuthenticationPartial(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == ssh_auth_e.SSH_AUTH_AGAIN: * return ssh_auth_e.SSH_AUTH_AGAIN */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationPartial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationPartial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2840,14 +2668,14 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 119, __pyx_L1_error) + __PYX_ERR(0, 108, __pyx_L1_error) - /* "ssh/utils.pyx":118 + /* "ssh/utils.pyx":107 * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: * raise AuthenticationError(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: # <<<<<<<<<<<<<< @@ -2857,7 +2685,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_AGAIN: - /* "ssh/utils.pyx":121 + /* "ssh/utils.pyx":110 * raise AuthenticationPartial(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_AGAIN: * return ssh_auth_e.SSH_AUTH_AGAIN # <<<<<<<<<<<<<< @@ -2867,7 +2695,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_r = SSH_AUTH_AGAIN; goto __pyx_L0; - /* "ssh/utils.pyx":120 + /* "ssh/utils.pyx":109 * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: * raise AuthenticationPartial(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_AGAIN: # <<<<<<<<<<<<<< @@ -2877,18 +2705,18 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; default: - /* "ssh/utils.pyx":123 + /* "ssh/utils.pyx":112 * return ssh_auth_e.SSH_AUTH_AGAIN * else: * return handle_error_codes(errcode, session) # <<<<<<<<<<<<<< */ - __pyx_t_5 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_errcode, __pyx_v_session); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_5 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_errcode, __pyx_v_session); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) __pyx_r = __pyx_t_5; goto __pyx_L0; break; } - /* "ssh/utils.pyx":111 + /* "ssh/utils.pyx":100 * * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: # <<<<<<<<<<<<<< @@ -2960,10 +2788,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AuthenticationPartial, __pyx_k_AuthenticationPartial, sizeof(__pyx_k_AuthenticationPartial), 0, 0, 1, 1}, {&__pyx_n_s_ENCODING, __pyx_k_ENCODING, sizeof(__pyx_k_ENCODING), 0, 0, 1, 1}, {&__pyx_n_s_EOF, __pyx_k_EOF, sizeof(__pyx_k_EOF), 0, 0, 1, 1}, - {&__pyx_n_s_FatalError, __pyx_k_FatalError, sizeof(__pyx_k_FatalError), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_OtherError, __pyx_k_OtherError, sizeof(__pyx_k_OtherError), 0, 0, 1, 1}, - {&__pyx_n_s_RequestDenied, __pyx_k_RequestDenied, sizeof(__pyx_k_RequestDenied), 0, 0, 1, 1}, {&__pyx_n_s_SSHError, __pyx_k_SSHError, sizeof(__pyx_k_SSHError), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, @@ -3058,7 +2884,6 @@ static int __Pyx_modinit_function_export_code(void) { if (__Pyx_ExportFunction("to_bytes", (void (*)(void))__pyx_f_3ssh_5utils_to_bytes, "PyObject *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ExportFunction("to_str", (void (*)(void))__pyx_f_3ssh_5utils_to_str, "PyObject *(char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ExportFunction("to_str_len", (void (*)(void))__pyx_f_3ssh_5utils_to_str_len, "PyObject *(char *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("_handle_general_error_codes", (void (*)(void))__pyx_f_3ssh_5utils__handle_general_error_codes, "int (int, ssh_session)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ExportFunction("handle_error_codes", (void (*)(void))__pyx_f_3ssh_5utils_handle_error_codes, "int (int, ssh_session)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ExportFunction("handle_auth_error_codes", (void (*)(void))__pyx_f_3ssh_5utils_handle_auth_error_codes, "int (int, ssh_session)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ExportFunction("ssh_string_to_bytes", (void (*)(void))__pyx_f_3ssh_5utils_ssh_string_to_bytes, "PyObject *(ssh_string)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) @@ -3328,47 +3153,33 @@ if (!__Pyx_RefNanny) { /* "ssh/utils.pyx":26 * SSH_WRITE_PENDING * - * from exceptions import RequestDenied, FatalError, OtherError, \ # <<<<<<<<<<<<<< + * from exceptions import OtherError, \ # <<<<<<<<<<<<<< * AuthenticationPartial, AuthenticationDenied, AuthenticationError, \ * SSHError, EOF */ - __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_n_s_RequestDenied); - __Pyx_GIVEREF(__pyx_n_s_RequestDenied); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_RequestDenied); - __Pyx_INCREF(__pyx_n_s_FatalError); - __Pyx_GIVEREF(__pyx_n_s_FatalError); - PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_FatalError); __Pyx_INCREF(__pyx_n_s_OtherError); __Pyx_GIVEREF(__pyx_n_s_OtherError); - PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_OtherError); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OtherError); __Pyx_INCREF(__pyx_n_s_AuthenticationPartial); __Pyx_GIVEREF(__pyx_n_s_AuthenticationPartial); - PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_AuthenticationPartial); + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_AuthenticationPartial); __Pyx_INCREF(__pyx_n_s_AuthenticationDenied); __Pyx_GIVEREF(__pyx_n_s_AuthenticationDenied); - PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_AuthenticationDenied); + PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_AuthenticationDenied); __Pyx_INCREF(__pyx_n_s_AuthenticationError); __Pyx_GIVEREF(__pyx_n_s_AuthenticationError); - PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_AuthenticationError); + PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_AuthenticationError); __Pyx_INCREF(__pyx_n_s_SSHError); __Pyx_GIVEREF(__pyx_n_s_SSHError); - PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_SSHError); + PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_SSHError); __Pyx_INCREF(__pyx_n_s_EOF); __Pyx_GIVEREF(__pyx_n_s_EOF); - PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_EOF); + PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_EOF); __pyx_t_1 = __Pyx_Import(__pyx_n_s_exceptions, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_RequestDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestDenied, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_FatalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FatalError, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OtherError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_OtherError, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error) diff --git a/ssh/utils.pxd b/ssh/utils.pxd index 60a5ff17..48c8d0ff 100644 --- a/ssh/utils.pxd +++ b/ssh/utils.pxd @@ -1,5 +1,6 @@ # This file is part of ssh-python. -# Copyright (C) 2017-2018 Panos Kittenis +# +# Copyright (C) 2017-2020 Panos Kittenis # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -19,7 +20,6 @@ from c_ssh cimport ssh_session, ssh_string cdef bytes to_bytes(_str) cdef object to_str(char *c_str) cdef object to_str_len(char *c_str, int length) -cdef int _handle_general_error_codes(int errcode, ssh_session) except -1 cdef int handle_error_codes(int errcode, ssh_session) except -1 cdef int handle_auth_error_codes(int errcode, ssh_session) except -1 cdef bytes ssh_string_to_bytes(ssh_string _str) diff --git a/ssh/utils.pyx b/ssh/utils.pyx index bda06091..d707a3fd 100644 --- a/ssh/utils.pyx +++ b/ssh/utils.pyx @@ -23,7 +23,7 @@ from c_ssh cimport ssh_error_types_e, ssh_get_error, ssh_auth_e, \ ssh_string_get_char, ssh_string_free, ssh_string_len, SSH_READ_PENDING, \ SSH_WRITE_PENDING -from exceptions import RequestDenied, FatalError, OtherError, \ +from exceptions import OtherError, \ AuthenticationPartial, AuthenticationDenied, AuthenticationError, \ SSHError, EOF @@ -81,7 +81,7 @@ def wait_socket(session not None, sock not None, timeout=None): select(readfds, writefds, (), timeout) -cdef int _handle_general_error_codes( +cdef int handle_error_codes( int errcode, ssh_session session) except -1: if errcode == SSH_OK: return SSH_OK @@ -97,17 +97,6 @@ cdef int _handle_general_error_codes( return errcode -cdef int handle_error_codes(int errcode, ssh_session session) except -1: - if errcode == ssh_error_types_e.SSH_NO_ERROR: - return 0 - elif errcode == ssh_error_types_e.SSH_REQUEST_DENIED: - raise RequestDenied(ssh_get_error(session)) - elif errcode == ssh_error_types_e.SSH_FATAL: - raise FatalError(ssh_get_error(session)) - else: - return _handle_general_error_codes(errcode, session) - - cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: return ssh_auth_e.SSH_AUTH_SUCCESS diff --git a/tests/test_channel.py b/tests/test_channel.py index 8b457b52..d5a85679 100644 --- a/tests/test_channel.py +++ b/tests/test_channel.py @@ -22,7 +22,7 @@ from ssh.key import SSHKey, import_pubkey_file, import_privkey_file from ssh import options -from ssh.exceptions import RequestDenied, KeyImportError +from ssh.exceptions import KeyImportError from ssh.utils import wait_socket from ssh.error_codes import SSH_AGAIN from ssh.exceptions import EOF, SSHError @@ -69,7 +69,6 @@ def test_channel_exec(self): self.assertFalse(chan.is_open()) self.assertTrue(chan.is_closed()) - @mark.flaky(reruns=5) def test_channel_non_blocking_exec(self): self._auth() self.session.set_blocking(0) @@ -93,18 +92,19 @@ def test_channel_non_blocking_exec(self): self.assertFalse(chan.is_eof()) self.assertFalse(chan.is_closed()) all_data = b"" - wait_socket(self.session, self.sock) - size, data = chan.read_nonblocking() - while size > 0: - all_data += data + while True: try: + if chan.poll(): + wait_socket(self.session, self.sock) size, data = chan.read_nonblocking() + if size > 0: + all_data += data except EOF: break lines = [s.decode('utf-8') for s in all_data.splitlines()] self.assertEqual(lines[0], self.resp) - wait_socket(self.session, self.sock) self.assertRaises(SSHError, chan.read) + self.assertRaises(EOF, chan.poll) self.assertTrue(chan.is_eof()) rc = chan.close() while rc == SSH_AGAIN: diff --git a/tests/test_session.py b/tests/test_session.py index 74b69b14..80af435c 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -25,7 +25,8 @@ from ssh.channel import Channel from ssh.key import SSHKey, import_pubkey_file, import_privkey_file from ssh import options -from ssh.exceptions import RequestDenied, KeyImportError, InvalidAPIUse +from ssh.exceptions import KeyImportError, InvalidAPIUse, \ + AuthenticationDenied from ssh.scp import SCP, SSH_SCP_READ, SSH_SCP_WRITE, SSH_SCP_RECURSIVE from ssh.error_codes import SSH_AGAIN from ssh.utils import wait_socket @@ -93,15 +94,15 @@ def test_socket_connect(self): session.options_set_port(self.port) self.assertEqual(session.set_socket(sock), 0) self.assertEqual(session.connect(), 0) - self.assertRaises(RequestDenied, session.userauth_none) + self.assertRaises(AuthenticationDenied, session.userauth_none) self.assertEqual( session.userauth_publickey(self.pkey), 0) def test_connect(self): self.assertEqual(self.session.connect(), 0) - self.assertRaises(RequestDenied, self.session.userauth_none) + self.assertRaises(AuthenticationDenied, self.session.userauth_none) self.assertRaises( - RequestDenied, self.session.userauth_publickey_auto, '') + AuthenticationDenied, self.session.userauth_publickey_auto, '') def test_key_auth(self): self.assertEqual(self.session.connect(), 0) From 436108605c6fc0875a482d86fbfb3f73d209c159 Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 11:30:47 +0100 Subject: [PATCH 03/11] Added documentation --- .environment.yml | 8 +++ .readthedocs.yml | 4 ++ doc/Makefile | 20 ++++++++ doc/conf.py | 120 +++++++++++++++++++++++++++++++++++++++++++ doc/index.rst | 20 ++++++++ doc/installation.rst | 62 ++++++++++++++++++++++ doc/make.bat | 35 +++++++++++++ 7 files changed, 269 insertions(+) create mode 100644 .environment.yml create mode 100644 .readthedocs.yml create mode 100644 doc/Makefile create mode 100644 doc/conf.py create mode 100644 doc/index.rst create mode 100644 doc/installation.rst create mode 100644 doc/make.bat diff --git a/.environment.yml b/.environment.yml new file mode 100644 index 00000000..7f9a732a --- /dev/null +++ b/.environment.yml @@ -0,0 +1,8 @@ +channels: + - conda-forge +dependencies: + - python + - setuptools + - libssh + - toolchain3 + - cython diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..db9795a9 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,4 @@ +conda: + file: .environment.yml +python: + setup_py_install: true diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 00000000..d4bb2cbb --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 00000000..e158f299 --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,120 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +import ssh + +# -- Project information ----------------------------------------------------- + +project = 'ssh-python' +copyright = '2020, Panos Kittenis' +author = 'Panos Kittenis' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + + +# -- Extension configuration ------------------------------------------------- + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = ssh.__version__ +# The full version, including alpha/beta/rc tags. +release = ssh.__version__ + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + ] +} + +# Output file base name for HTML help builder. +htmlhelp_basename = 'ssh-pythondoc' +intersphinx_mapping = {'https://docs.python.org/': None} +autoclass_content = "both" diff --git a/doc/index.rst b/doc/index.rst new file mode 100644 index 00000000..74e38f01 --- /dev/null +++ b/doc/index.rst @@ -0,0 +1,20 @@ +.. ssh-python documentation master file, created by + sphinx-quickstart on Tue Aug 18 19:56:47 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to ssh-python's documentation! +====================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + installation + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/installation.rst b/doc/installation.rst new file mode 100644 index 00000000..2756cf0a --- /dev/null +++ b/doc/installation.rst @@ -0,0 +1,62 @@ +Installation +************* + +Pip Binary Packages +==================== + +``pip install ssh-python`` will attempt to download a pre-compiled wheel, or try to build from source if one does not exist for the platform. + +``pip install -U pip`` to upgrade version of pip, helpful on older Python installations. + +Building from Source +===================== + +By default, the package will try to build against an embedded version of ``libssh``. + +To build against a system library, export the ``SYSTEM_LIBSSH=1`` environment variable prior to building. + +The following libraries are required: + +* OpenSSL 1.0 or 1.1, >=1.1 for Ed25519 support +* Kerberos 5 for GSSAPI authentication +* Zlib for compression support + + +Pip Installation Methods +------------------------- + +``pip install .`` in the sources root directory will build and install a wheel. + +``pip wheel .`` to build a wheel alone. + + +System Installation Methods +---------------------------- + +``python setup.py install`` when wanting to make a system package, or to install in ``site-packages``. + +``SYSTEM_LIBSSH=1 python setup.py install`` to build against system libssh and install to ``site-packages``. + + +Building on Windows +-------------------- + +Requirements: + +* Python >= 3.6 +* Visual Studio 14 or above +* OpenSSL 1.1 +* Zlib +* Kerberos 5 for GSSAPI authentication +* libssh + +Steps +++++++ + +* Build and install dependencies +* Install python package via ``python setup.py install`` or ``pip install .`` + * ``pip wheel .`` as before for creating a wheel. + +Note dependencies will need to be built statically to be distributable to other Windows systems. + +Cygwin/MingW probably do not work. diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 00000000..2119f510 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd From 61d8fbf167dc6a4d76d7881b761b55ce053b919b Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:03:27 +0100 Subject: [PATCH 04/11] Added documentation. Removed unused files. Updated tests --- doc/api.rst | 20 + doc/callbacks.rst | 7 + doc/channel.rst | 7 + doc/connector.rst | 7 + doc/event.rst | 7 + doc/exceptions.rst | 7 + doc/index.rst | 27 +- doc/key.rst | 7 + doc/keytypes.rst | 7 + doc/options.rst | 7 + doc/scp.rst | 7 + doc/session.rst | 7 + doc/sftp.rst | 7 + doc/sftp_attributes.rst | 7 + doc/sftp_handles.rst | 7 + doc/sftp_statvfs.rst | 7 + doc/utils.rst | 7 + ssh/exceptions.c | 514 ++-- ssh/exceptions.pyx | 17 +- ssh/helper.c | 3547 -------------------------- ssh/helper.pyx | 37 - ssh/keytypes.c | 2 +- ssh/keytypes.pyx | 2 +- ssh/utils.c | 681 +++-- ssh/utils.pyx | 7 +- tests/{base_test.py => base_case.py} | 0 tests/test_channel.py | 4 +- tests/test_connector.py | 4 +- tests/test_event.py | 4 +- tests/test_session.py | 4 +- tests/test_sftp.py | 2 +- 31 files changed, 729 insertions(+), 4248 deletions(-) create mode 100644 doc/api.rst create mode 100644 doc/callbacks.rst create mode 100644 doc/channel.rst create mode 100644 doc/connector.rst create mode 100644 doc/event.rst create mode 100644 doc/exceptions.rst create mode 100644 doc/key.rst create mode 100644 doc/keytypes.rst create mode 100644 doc/options.rst create mode 100644 doc/scp.rst create mode 100644 doc/session.rst create mode 100644 doc/sftp.rst create mode 100644 doc/sftp_attributes.rst create mode 100644 doc/sftp_handles.rst create mode 100644 doc/sftp_statvfs.rst create mode 100644 doc/utils.rst delete mode 100644 ssh/helper.c delete mode 100644 ssh/helper.pyx rename tests/{base_test.py => base_case.py} (100%) diff --git a/doc/api.rst b/doc/api.rst new file mode 100644 index 00000000..d288314b --- /dev/null +++ b/doc/api.rst @@ -0,0 +1,20 @@ +API Documentation +******************** + +.. toctree:: + + session + channel + exceptions + options + key + keytypes + sftp + sftp_handles + sftp_attributes + sftp_statvfs + scp + callbacks + connector + event + utils diff --git a/doc/callbacks.rst b/doc/callbacks.rst new file mode 100644 index 00000000..5475c3ab --- /dev/null +++ b/doc/callbacks.rst @@ -0,0 +1,7 @@ +ssh.callbacks +============= + +.. automodule:: ssh.callbacks + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/channel.rst b/doc/channel.rst new file mode 100644 index 00000000..8ab05cf5 --- /dev/null +++ b/doc/channel.rst @@ -0,0 +1,7 @@ +ssh.channel +=========== + +.. automodule:: ssh.channel + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/connector.rst b/doc/connector.rst new file mode 100644 index 00000000..a421307d --- /dev/null +++ b/doc/connector.rst @@ -0,0 +1,7 @@ +ssh.connector +============= + +.. automodule:: ssh.connector + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/event.rst b/doc/event.rst new file mode 100644 index 00000000..0f4771c4 --- /dev/null +++ b/doc/event.rst @@ -0,0 +1,7 @@ +ssh.event +========= + +.. automodule:: ssh.event + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/exceptions.rst b/doc/exceptions.rst new file mode 100644 index 00000000..b6cd934c --- /dev/null +++ b/doc/exceptions.rst @@ -0,0 +1,7 @@ +ssh.exceptions +============== + +.. automodule:: ssh.exceptions + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/index.rst b/doc/index.rst index 74e38f01..c009fa6d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,16 +1,31 @@ -.. ssh-python documentation master file, created by - sphinx-quickstart on Tue Aug 18 19:56:47 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. +ssh-python documentation +======================== + +Bindings for libssh_ C library. + +.. image:: https://img.shields.io/badge/License-LGPL%20v2-blue.svg + :target: https://pypi.python.org/pypi/ssh-python + :alt: License +.. image:: https://img.shields.io/pypi/v/ssh-python.svg + :target: https://pypi.python.org/pypi/ssh-python + :alt: Latest Version +.. image:: https://circleci.com/gh/ParallelSSH/ssh-python/tree/master.svg?style=shield + :target: https://circleci.com/gh/ParallelSSH/ssh-python/tree/master +.. image:: https://img.shields.io/pypi/wheel/ssh-python.svg + :target: https://pypi.python.org/pypi/ssh-python +.. image:: https://img.shields.io/pypi/pyversions/ssh-python.svg + :target: https://pypi.python.org/pypi/ssh-python +.. image:: https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true + :target: https://ci.appveyor.com/project/pkittenis/ssh-python -Welcome to ssh-python's documentation! -====================================== .. toctree:: :maxdepth: 2 :caption: Contents: installation + api + Indices and tables ================== diff --git a/doc/key.rst b/doc/key.rst new file mode 100644 index 00000000..b4faf1b7 --- /dev/null +++ b/doc/key.rst @@ -0,0 +1,7 @@ +ssh.key +======= + +.. automodule:: ssh.key + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/keytypes.rst b/doc/keytypes.rst new file mode 100644 index 00000000..734df759 --- /dev/null +++ b/doc/keytypes.rst @@ -0,0 +1,7 @@ +ssh.keytypes +============ + +.. automodule:: ssh.keytypes + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/options.rst b/doc/options.rst new file mode 100644 index 00000000..1785fd3f --- /dev/null +++ b/doc/options.rst @@ -0,0 +1,7 @@ +ssh.options +=========== + +.. automodule:: ssh.options + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/scp.rst b/doc/scp.rst new file mode 100644 index 00000000..75f9d4c5 --- /dev/null +++ b/doc/scp.rst @@ -0,0 +1,7 @@ +ssh.scp +======= + +.. automodule:: ssh.scp + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/session.rst b/doc/session.rst new file mode 100644 index 00000000..ba823cb6 --- /dev/null +++ b/doc/session.rst @@ -0,0 +1,7 @@ +ssh.session +=========== + +.. automodule:: ssh.session + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/sftp.rst b/doc/sftp.rst new file mode 100644 index 00000000..63bd06f7 --- /dev/null +++ b/doc/sftp.rst @@ -0,0 +1,7 @@ +ssh.sftp +=========== + +.. automodule:: ssh.sftp + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/sftp_attributes.rst b/doc/sftp_attributes.rst new file mode 100644 index 00000000..206a3836 --- /dev/null +++ b/doc/sftp_attributes.rst @@ -0,0 +1,7 @@ +ssh.sftp_attributes +=================== + +.. automodule:: ssh.sftp_attributes + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/sftp_handles.rst b/doc/sftp_handles.rst new file mode 100644 index 00000000..2041e668 --- /dev/null +++ b/doc/sftp_handles.rst @@ -0,0 +1,7 @@ +ssh.sftp_handles +================ + +.. automodule:: ssh.sftp_handles + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/sftp_statvfs.rst b/doc/sftp_statvfs.rst new file mode 100644 index 00000000..1ca1b8b6 --- /dev/null +++ b/doc/sftp_statvfs.rst @@ -0,0 +1,7 @@ +ssh.sftp_statvfs +================ + +.. automodule:: ssh.sftp_statvfs + :members: + :undoc-members: + :member-order: groupwise diff --git a/doc/utils.rst b/doc/utils.rst new file mode 100644 index 00000000..39d46d15 --- /dev/null +++ b/doc/utils.rst @@ -0,0 +1,7 @@ +ssh.utils +========= + +.. automodule:: ssh.utils + :members: + :undoc-members: + :member-order: groupwise diff --git a/ssh/exceptions.c b/ssh/exceptions.c index 2dbdc418..e49bc3e3 100644 --- a/ssh/exceptions.c +++ b/ssh/exceptions.c @@ -1086,7 +1086,6 @@ static const char __pyx_k_AuthenticationError[] = "AuthenticationError"; static const char __pyx_k_ServiceNotAvailable[] = "ServiceNotAvailable"; static const char __pyx_k_AuthenticationDenied[] = "AuthenticationDenied"; static const char __pyx_k_HostKeyNotVerifiable[] = "HostKeyNotVerifiable"; -static const char __pyx_k_Raised_on_EOF_errors[] = "Raised on EOF errors"; static const char __pyx_k_Raised_on_MAC_errors[] = "Raised on MAC errors"; static const char __pyx_k_AuthenticationPartial[] = "AuthenticationPartial"; static const char __pyx_k_Raised_on_SFTP_errors[] = "Raised on SFTP errors"; @@ -1112,10 +1111,11 @@ static const char __pyx_k_Raised_on_errors_generating_key[] = "Raised on errors static const char __pyx_k_Raised_on_key_exchange_failures[] = "Raised on key exchange failures"; static const char __pyx_k_Raised_on_service_not_available[] = "Raised on service not available errors"; static const char __pyx_k_Base_class_for_all_errors_produc[] = "Base class for all errors produced by libssh"; +static const char __pyx_k_Raised_on_EOF_from_remote_channe[] = "Raised on EOF from remote channel"; static const char __pyx_k_Raised_on_SSH_channel_open_failu[] = "Raised on SSH channel open failures"; static const char __pyx_k_Raised_on_administratively_prohi[] = "Raised on administratively prohibited errors"; static const char __pyx_k_Raised_on_errors_getting_setting[] = "Raised on errors getting/setting options"; -static const char __pyx_k_Raised_on_errors_using_the_libss[] = "Raised on errors using the libssh API and unknown errors from servers"; +static const char __pyx_k_Raised_on_errors_returned_by_lib[] = "Raised on errors returned by libssh.\n\n This is the general error libssh returns when any error\n occurs, whether that be server error or API error.\n\n Some functions like authentication have more specific error\n codes.\n "; static const char __pyx_k_Raised_on_fatal_errors_authentic[] = "Raised on fatal errors authenticating"; static const char __pyx_k_Raised_on_host_authentication_fa[] = "Raised on host authentication failures"; static const char __pyx_k_Raised_on_host_key_not_verifiabl[] = "Raised on host key not verifiable errors"; @@ -1155,7 +1155,7 @@ static PyObject *__pyx_n_s_OptionError; static PyObject *__pyx_n_s_OtherError; static PyObject *__pyx_n_s_ProtocolError; static PyObject *__pyx_n_s_ProtocolVersionNotSupport; -static PyObject *__pyx_kp_s_Raised_on_EOF_errors; +static PyObject *__pyx_kp_s_Raised_on_EOF_from_remote_channe; static PyObject *__pyx_kp_s_Raised_on_GSS_API_errors; static PyObject *__pyx_kp_s_Raised_on_GSS_API_token_errors; static PyObject *__pyx_kp_s_Raised_on_MAC_errors; @@ -1173,7 +1173,7 @@ static PyObject *__pyx_kp_s_Raised_on_errors_exporting_key; static PyObject *__pyx_kp_s_Raised_on_errors_generating_key; static PyObject *__pyx_kp_s_Raised_on_errors_getting_setting; static PyObject *__pyx_kp_s_Raised_on_errors_importing_key; -static PyObject *__pyx_kp_s_Raised_on_errors_using_the_libss; +static PyObject *__pyx_kp_s_Raised_on_errors_returned_by_lib; static PyObject *__pyx_kp_s_Raised_on_fatal_errors_authentic; static PyObject *__pyx_kp_s_Raised_on_host_authentication_fa; static PyObject *__pyx_kp_s_Raised_on_host_key_not_verifiabl; @@ -1285,7 +1285,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_OtherError, __pyx_k_OtherError, sizeof(__pyx_k_OtherError), 0, 0, 1, 1}, {&__pyx_n_s_ProtocolError, __pyx_k_ProtocolError, sizeof(__pyx_k_ProtocolError), 0, 0, 1, 1}, {&__pyx_n_s_ProtocolVersionNotSupport, __pyx_k_ProtocolVersionNotSupport, sizeof(__pyx_k_ProtocolVersionNotSupport), 0, 0, 1, 1}, - {&__pyx_kp_s_Raised_on_EOF_errors, __pyx_k_Raised_on_EOF_errors, sizeof(__pyx_k_Raised_on_EOF_errors), 0, 0, 1, 0}, + {&__pyx_kp_s_Raised_on_EOF_from_remote_channe, __pyx_k_Raised_on_EOF_from_remote_channe, sizeof(__pyx_k_Raised_on_EOF_from_remote_channe), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_GSS_API_errors, __pyx_k_Raised_on_GSS_API_errors, sizeof(__pyx_k_Raised_on_GSS_API_errors), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_GSS_API_token_errors, __pyx_k_Raised_on_GSS_API_token_errors, sizeof(__pyx_k_Raised_on_GSS_API_token_errors), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_MAC_errors, __pyx_k_Raised_on_MAC_errors, sizeof(__pyx_k_Raised_on_MAC_errors), 0, 0, 1, 0}, @@ -1303,7 +1303,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Raised_on_errors_generating_key, __pyx_k_Raised_on_errors_generating_key, sizeof(__pyx_k_Raised_on_errors_generating_key), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_errors_getting_setting, __pyx_k_Raised_on_errors_getting_setting, sizeof(__pyx_k_Raised_on_errors_getting_setting), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_errors_importing_key, __pyx_k_Raised_on_errors_importing_key, sizeof(__pyx_k_Raised_on_errors_importing_key), 0, 0, 1, 0}, - {&__pyx_kp_s_Raised_on_errors_using_the_libss, __pyx_k_Raised_on_errors_using_the_libss, sizeof(__pyx_k_Raised_on_errors_using_the_libss), 0, 0, 1, 0}, + {&__pyx_kp_s_Raised_on_errors_returned_by_lib, __pyx_k_Raised_on_errors_returned_by_lib, sizeof(__pyx_k_Raised_on_errors_returned_by_lib), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_fatal_errors_authentic, __pyx_k_Raised_on_fatal_errors_authentic, sizeof(__pyx_k_Raised_on_fatal_errors_authentic), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_host_authentication_fa, __pyx_k_Raised_on_host_authentication_fa, sizeof(__pyx_k_Raised_on_host_authentication_fa), 0, 0, 1, 0}, {&__pyx_kp_s_Raised_on_host_key_not_verifiabl, __pyx_k_Raised_on_host_key_not_verifiabl, sizeof(__pyx_k_Raised_on_host_key_not_verifiabl), 0, 0, 1, 0}, @@ -1679,8 +1679,8 @@ if (!__Pyx_RefNanny) { /* "ssh/exceptions.pyx":26 * * - * class OtherError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on other non-specific fatal errors""" + * class SSHError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors returned by libssh. * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) @@ -1692,868 +1692,868 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OtherError, __pyx_n_s_OtherError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_other_non_specific_fat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SSHError, __pyx_n_s_SSHError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_returned_by_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OtherError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SSHError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_OtherError, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SSHError, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":30 + /* "ssh/exceptions.pyx":37 * * - * class AuthenticationDenied(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on authentication denied errors""" + * class OtherError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on other non-specific fatal errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationDenied, __pyx_n_s_AuthenticationDenied, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_authentication_denied); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OtherError, __pyx_n_s_OtherError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_other_non_specific_fat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationDenied, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OtherError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationDenied, __pyx_t_4) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_OtherError, __pyx_t_4) < 0) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":34 + /* "ssh/exceptions.pyx":41 * * - * class AuthenticationError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on fatal errors authenticating""" + * class AuthenticationDenied(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on authentication denied errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_AuthenticationError, __pyx_n_s_AuthenticationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_fatal_errors_authentic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_AuthenticationDenied, __pyx_n_s_AuthenticationDenied, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_authentication_denied); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_AuthenticationError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_AuthenticationDenied, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationError, __pyx_t_4) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationDenied, __pyx_t_4) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":38 + /* "ssh/exceptions.pyx":45 * * - * class AuthenticationPartial(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on partial authentication""" + * class AuthenticationError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on fatal errors authenticating""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationPartial, __pyx_n_s_AuthenticationPartial, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_partial_authentication); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AuthenticationError, __pyx_n_s_AuthenticationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_fatal_errors_authentic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationPartial, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AuthenticationError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationPartial, __pyx_t_4) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationError, __pyx_t_4) < 0) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":42 + /* "ssh/exceptions.pyx":49 * * - * class KeyExportError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors exporting key""" + * class AuthenticationPartial(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on partial authentication""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExportError, __pyx_n_s_KeyExportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_exporting_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_AuthenticationPartial, __pyx_n_s_AuthenticationPartial, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_partial_authentication); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExportError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_AuthenticationPartial, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExportError, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuthenticationPartial, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":46 + /* "ssh/exceptions.pyx":53 * * - * class KeyImportError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors importing key""" + * class KeyExportError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors exporting key""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KeyImportError, __pyx_n_s_KeyImportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_importing_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KeyExportError, __pyx_n_s_KeyExportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_exporting_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KeyImportError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KeyExportError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyImportError, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExportError, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":50 + /* "ssh/exceptions.pyx":57 * * - * class KeyGenerationError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors generating key""" + * class KeyImportError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors importing key""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyGenerationError, __pyx_n_s_KeyGenerationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_generating_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyImportError, __pyx_n_s_KeyImportError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_importing_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyGenerationError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyImportError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyGenerationError, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyImportError, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":54 + /* "ssh/exceptions.pyx":61 * * - * class SSHError(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on errors using the libssh API and unknown errors from servers""" + * class KeyGenerationError(BaseSSHError): # <<<<<<<<<<<<<< + * """Raised on errors generating key""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SSHError, __pyx_n_s_SSHError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_using_the_libss); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KeyGenerationError, __pyx_n_s_KeyGenerationError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_errors_generating_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SSHError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KeyGenerationError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SSHError, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyGenerationError, __pyx_t_4) < 0) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":58 + /* "ssh/exceptions.pyx":65 * * * class EOF(BaseSSHError): # <<<<<<<<<<<<<< - * """Raised on EOF errors""" + * """Raised on EOF from remote channel""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EOF, __pyx_n_s_EOF, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_EOF_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EOF, __pyx_n_s_EOF, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_EOF_from_remote_channe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EOF, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EOF, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOF, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOF, __pyx_t_4) < 0) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":62 + /* "ssh/exceptions.pyx":69 * * * class InvalidAPIUse(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on invalid uses of the API""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InvalidAPIUse, __pyx_n_s_InvalidAPIUse, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_invalid_uses_of_the_AP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InvalidAPIUse, __pyx_n_s_InvalidAPIUse, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_invalid_uses_of_the_AP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidAPIUse, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidAPIUse, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidAPIUse, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidAPIUse, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":66 + /* "ssh/exceptions.pyx":73 * * * class Disconnected(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on disconnection errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Disconnected, __pyx_n_s_Disconnected, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_disconnection_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Disconnected, __pyx_n_s_Disconnected, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_disconnection_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Disconnected, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Disconnected, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Disconnected, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Disconnected, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":70 + /* "ssh/exceptions.pyx":77 * * * class UnImplemented(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on unimplemented errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnImplemented, __pyx_n_s_UnImplemented, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unimplemented_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnImplemented, __pyx_n_s_UnImplemented, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unimplemented_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnImplemented, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnImplemented, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnImplemented, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnImplemented, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":74 + /* "ssh/exceptions.pyx":81 * * * class GSSAPIError(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on GSS API errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_GSSAPIError, __pyx_n_s_GSSAPIError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_GSSAPIError, __pyx_n_s_GSSAPIError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_GSSAPIError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_GSSAPIError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIError, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIError, __pyx_t_4) < 0) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":78 + /* "ssh/exceptions.pyx":85 * * * class GSSAPIErrorTok(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on GSS API token errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GSSAPIErrorTok, __pyx_n_s_GSSAPIErrorTok, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_token_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GSSAPIErrorTok, __pyx_n_s_GSSAPIErrorTok, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_GSS_API_token_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GSSAPIErrorTok, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GSSAPIErrorTok, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIErrorTok, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GSSAPIErrorTok, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":82 + /* "ssh/exceptions.pyx":89 * * * class RequestFailure(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on SSH request failures""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RequestFailure, __pyx_n_s_RequestFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_request_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RequestFailure, __pyx_n_s_RequestFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_request_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RequestFailure, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RequestFailure, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestFailure, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestFailure, __pyx_t_4) < 0) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":86 + /* "ssh/exceptions.pyx":93 * * * class ChannelOpenFailure(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on SSH channel open failures""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelOpenFailure, __pyx_n_s_ChannelOpenFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_channel_open_failu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelOpenFailure, __pyx_n_s_ChannelOpenFailure, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SSH_channel_open_failu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelOpenFailure, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelOpenFailure, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelOpenFailure, __pyx_t_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelOpenFailure, __pyx_t_4) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":90 + /* "ssh/exceptions.pyx":97 * * * class HostNotAllowedToConnect(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on host not allowed to connect errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostNotAllowedToConnect, __pyx_n_s_HostNotAllowedToConnect, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_not_allowed_to_co); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostNotAllowedToConnect, __pyx_n_s_HostNotAllowedToConnect, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_not_allowed_to_co); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_4) < 0) __PYX_ERR(0, 90, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostNotAllowedToConnect, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":94 + /* "ssh/exceptions.pyx":101 * * * class ProtocolError(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on protocol errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolError, __pyx_n_s_ProtocolError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolError, __pyx_n_s_ProtocolError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolError, __pyx_t_4) < 0) __PYX_ERR(0, 94, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolError, __pyx_t_4) < 0) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":98 + /* "ssh/exceptions.pyx":105 * * * class KeyExchangeFailed(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on key exchange failures""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExchangeFailed, __pyx_n_s_KeyExchangeFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_key_exchange_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KeyExchangeFailed, __pyx_n_s_KeyExchangeFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_key_exchange_failures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExchangeFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KeyExchangeFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExchangeFailed, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KeyExchangeFailed, __pyx_t_4) < 0) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":102 + /* "ssh/exceptions.pyx":109 * * * class HostAuthenticationFailed(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on host authentication failures""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HostAuthenticationFailed, __pyx_n_s_HostAuthenticationFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_authentication_fa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HostAuthenticationFailed, __pyx_n_s_HostAuthenticationFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_authentication_fa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HostAuthenticationFailed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HostAuthenticationFailed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostAuthenticationFailed, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostAuthenticationFailed, __pyx_t_4) < 0) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":106 + /* "ssh/exceptions.pyx":113 * * * class MACError(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on MAC errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MACError, __pyx_n_s_MACError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_MAC_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MACError, __pyx_n_s_MACError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_MAC_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MACError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MACError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MACError, __pyx_t_4) < 0) __PYX_ERR(0, 106, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MACError, __pyx_t_4) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":110 + /* "ssh/exceptions.pyx":117 * * * class CompressionError(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on compression errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CompressionError, __pyx_n_s_CompressionError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_compression_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CompressionError, __pyx_n_s_CompressionError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_compression_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CompressionError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CompressionError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompressionError, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompressionError, __pyx_t_4) < 0) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":114 + /* "ssh/exceptions.pyx":121 * * * class ServiceNotAvailable(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on service not available errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ServiceNotAvailable, __pyx_n_s_ServiceNotAvailable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_service_not_available); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ServiceNotAvailable, __pyx_n_s_ServiceNotAvailable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_service_not_available); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ServiceNotAvailable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ServiceNotAvailable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ServiceNotAvailable, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ServiceNotAvailable, __pyx_t_4) < 0) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":118 + /* "ssh/exceptions.pyx":125 * * * class ProtocolVersionNotSupport(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on protocol version not supported""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolVersionNotSupport, __pyx_n_s_ProtocolVersionNotSupport, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_version_not_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtocolVersionNotSupport, __pyx_n_s_ProtocolVersionNotSupport, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_protocol_version_not_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_4) < 0) __PYX_ERR(0, 118, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtocolVersionNotSupport, __pyx_t_4) < 0) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":122 + /* "ssh/exceptions.pyx":129 * * * class HostKeyNotVerifiable(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on host key not verifiable errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostKeyNotVerifiable, __pyx_n_s_HostKeyNotVerifiable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_key_not_verifiabl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_HostKeyNotVerifiable, __pyx_n_s_HostKeyNotVerifiable, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_host_key_not_verifiabl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostKeyNotVerifiable, __pyx_t_4) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":126 + /* "ssh/exceptions.pyx":133 * * * class ConnectionLost(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on connection lost""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ConnectionLost, __pyx_n_s_ConnectionLost, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connection_lost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ConnectionLost, __pyx_n_s_ConnectionLost, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connection_lost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ConnectionLost, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ConnectionLost, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectionLost, __pyx_t_4) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectionLost, __pyx_t_4) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":130 + /* "ssh/exceptions.pyx":137 * * * class TooManyConnections(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on too many connection errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TooManyConnections, __pyx_n_s_TooManyConnections, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_too_many_connection_er); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TooManyConnections, __pyx_n_s_TooManyConnections, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_too_many_connection_er); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TooManyConnections, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TooManyConnections, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TooManyConnections, __pyx_t_4) < 0) __PYX_ERR(0, 130, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TooManyConnections, __pyx_t_4) < 0) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":134 + /* "ssh/exceptions.pyx":141 * * * class AdministrativelyProhibited(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on administratively prohibited errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AdministrativelyProhibited, __pyx_n_s_AdministrativelyProhibited, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_administratively_prohi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AdministrativelyProhibited, __pyx_n_s_AdministrativelyProhibited, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_administratively_prohi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AdministrativelyProhibited, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AdministrativelyProhibited, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_AdministrativelyProhibited, __pyx_t_4) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_AdministrativelyProhibited, __pyx_t_4) < 0) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":138 + /* "ssh/exceptions.pyx":145 * * * class ConnectFailed(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on connect failure""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ConnectFailed, __pyx_n_s_ConnectFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connect_failure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ConnectFailed, __pyx_n_s_ConnectFailed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_connect_failure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ConnectFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ConnectFailed, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectFailed, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectFailed, __pyx_t_4) < 0) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":142 + /* "ssh/exceptions.pyx":149 * * * class UnknownChannelType(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on unknown channel type""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnknownChannelType, __pyx_n_s_UnknownChannelType, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unknown_channel_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnknownChannelType, __pyx_n_s_UnknownChannelType, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_unknown_channel_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnknownChannelType, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnknownChannelType, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnknownChannelType, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnknownChannelType, __pyx_t_4) < 0) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":146 + /* "ssh/exceptions.pyx":153 * * * class ResourceShortage(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on resource shortage errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ResourceShortage, __pyx_n_s_ResourceShortage, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_resource_shortage_erro); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ResourceShortage, __pyx_n_s_ResourceShortage, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_resource_shortage_erro); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ResourceShortage, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ResourceShortage, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ResourceShortage, __pyx_t_4) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ResourceShortage, __pyx_t_4) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":150 + /* "ssh/exceptions.pyx":157 * * * class SFTPError(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on SFTP errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SFTPError, __pyx_n_s_SFTPError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SFTPError, __pyx_n_s_SFTPError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SFTPError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SFTPError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPError, __pyx_t_4) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPError, __pyx_t_4) < 0) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/exceptions.pyx":154 + /* "ssh/exceptions.pyx":161 * * * class SFTPHandleError(SFTPError): # <<<<<<<<<<<<<< * """Raised on SFTP handle errors""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SFTPError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SFTPError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SFTPHandleError, __pyx_n_s_SFTPHandleError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_handle_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SFTPHandleError, __pyx_n_s_SFTPHandleError, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_SFTP_handle_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SFTPHandleError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SFTPHandleError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPHandleError, __pyx_t_4) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SFTPHandleError, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/exceptions.pyx":158 + /* "ssh/exceptions.pyx":165 * * * class ChannelClosed(BaseSSHError): # <<<<<<<<<<<<<< * """Raised on operations on closed channels""" */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseSSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelClosed, __pyx_n_s_ChannelClosed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_operations_on_closed_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ChannelClosed, __pyx_n_s_ChannelClosed, (PyObject *) NULL, __pyx_n_s_ssh_exceptions, __pyx_kp_s_Raised_on_operations_on_closed_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelClosed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChannelClosed, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelClosed, __pyx_t_4) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChannelClosed, __pyx_t_4) < 0) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; diff --git a/ssh/exceptions.pyx b/ssh/exceptions.pyx index 5da1c80f..482de6bd 100644 --- a/ssh/exceptions.pyx +++ b/ssh/exceptions.pyx @@ -23,6 +23,17 @@ class BaseSSHError(Exception): """Base class for all errors produced by libssh""" +class SSHError(BaseSSHError): + """Raised on errors returned by libssh. + + This is the general error libssh returns when any error + occurs, whether that be server error or API error. + + Some functions like authentication have more specific error + codes. + """ + + class OtherError(BaseSSHError): """Raised on other non-specific fatal errors""" @@ -51,12 +62,8 @@ class KeyGenerationError(BaseSSHError): """Raised on errors generating key""" -class SSHError(BaseSSHError): - """Raised on errors using the libssh API and unknown errors from servers""" - - class EOF(BaseSSHError): - """Raised on EOF errors""" + """Raised on EOF from remote channel""" class InvalidAPIUse(BaseSSHError): diff --git a/ssh/helper.c b/ssh/helper.c deleted file mode 100644 index 3081e414..00000000 --- a/ssh/helper.c +++ /dev/null @@ -1,3547 +0,0 @@ -/* Generated by Cython 0.29.21 */ - -#define PY_SSIZE_T_CLEAN -#include "Python.h" -#ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. -#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. -#else -#define CYTHON_ABI "0_29_21" -#define CYTHON_HEX_VERSION 0x001D15F0 -#define CYTHON_FUTURE_DIVISION 0 -#include -#ifndef offsetof - #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) -#endif -#if !defined(WIN32) && !defined(MS_WINDOWS) - #ifndef __stdcall - #define __stdcall - #endif - #ifndef __cdecl - #define __cdecl - #endif - #ifndef __fastcall - #define __fastcall - #endif -#endif -#ifndef DL_IMPORT - #define DL_IMPORT(t) t -#endif -#ifndef DL_EXPORT - #define DL_EXPORT(t) t -#endif -#define __PYX_COMMA , -#ifndef HAVE_LONG_LONG - #if PY_VERSION_HEX >= 0x02070000 - #define HAVE_LONG_LONG - #endif -#endif -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG -#endif -#ifndef Py_HUGE_VAL - #define Py_HUGE_VAL HUGE_VAL -#endif -#ifdef PYPY_VERSION - #define CYTHON_COMPILING_IN_PYPY 1 - #define CYTHON_COMPILING_IN_PYSTON 0 - #define CYTHON_COMPILING_IN_CPYTHON 0 - #undef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 0 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #if PY_VERSION_HEX < 0x03050000 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #elif !defined(CYTHON_USE_ASYNC_SLOTS) - #define CYTHON_USE_ASYNC_SLOTS 1 - #endif - #undef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 0 - #undef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 0 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #undef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 1 - #undef CYTHON_ASSUME_SAFE_MACROS - #define CYTHON_ASSUME_SAFE_MACROS 0 - #undef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 0 - #undef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 - #undef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS 0 - #undef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK 0 -#elif defined(PYSTON_VERSION) - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_PYSTON 1 - #define CYTHON_COMPILING_IN_CPYTHON 0 - #ifndef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 1 - #endif - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #undef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 0 - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #ifndef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 0 - #endif - #ifndef CYTHON_ASSUME_SAFE_MACROS - #define CYTHON_ASSUME_SAFE_MACROS 1 - #endif - #ifndef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 1 - #endif - #undef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 - #undef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS 0 - #undef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK 0 -#else - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_PYSTON 0 - #define CYTHON_COMPILING_IN_CPYTHON 1 - #ifndef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 1 - #endif - #if PY_VERSION_HEX < 0x02070000 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) - #define CYTHON_USE_PYTYPE_LOOKUP 1 - #endif - #if PY_MAJOR_VERSION < 3 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #elif !defined(CYTHON_USE_ASYNC_SLOTS) - #define CYTHON_USE_ASYNC_SLOTS 1 - #endif - #if PY_VERSION_HEX < 0x02070000 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #elif !defined(CYTHON_USE_PYLONG_INTERNALS) - #define CYTHON_USE_PYLONG_INTERNALS 1 - #endif - #ifndef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 1 - #endif - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif - #if PY_VERSION_HEX < 0x030300F0 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) - #define CYTHON_USE_UNICODE_WRITER 1 - #endif - #ifndef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 0 - #endif - #ifndef CYTHON_ASSUME_SAFE_MACROS - #define CYTHON_ASSUME_SAFE_MACROS 1 - #endif - #ifndef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 1 - #endif - #ifndef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 1 - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) - #endif - #ifndef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) - #endif - #ifndef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) - #endif - #ifndef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) - #endif -#endif -#if !defined(CYTHON_FAST_PYCCALL) -#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) -#endif -#if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #undef SHIFT - #undef BASE - #undef MASK - #ifdef SIZEOF_VOID_P - enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; - #endif -#endif -#ifndef __has_attribute - #define __has_attribute(x) 0 -#endif -#ifndef __has_cpp_attribute - #define __has_cpp_attribute(x) 0 -#endif -#ifndef CYTHON_RESTRICT - #if defined(__GNUC__) - #define CYTHON_RESTRICT __restrict__ - #elif defined(_MSC_VER) && _MSC_VER >= 1400 - #define CYTHON_RESTRICT __restrict - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_RESTRICT restrict - #else - #define CYTHON_RESTRICT - #endif -#endif -#ifndef CYTHON_UNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -#endif -#ifndef CYTHON_MAYBE_UNUSED_VAR -# if defined(__cplusplus) - template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } -# else -# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) -# endif -#endif -#ifndef CYTHON_NCP_UNUSED -# if CYTHON_COMPILING_IN_CPYTHON -# define CYTHON_NCP_UNUSED -# else -# define CYTHON_NCP_UNUSED CYTHON_UNUSED -# endif -#endif -#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) -#ifdef _MSC_VER - #ifndef _MSC_STDINT_H_ - #if _MSC_VER < 1300 - typedef unsigned char uint8_t; - typedef unsigned int uint32_t; - #else - typedef unsigned __int8 uint8_t; - typedef unsigned __int32 uint32_t; - #endif - #endif -#else - #include -#endif -#ifndef CYTHON_FALLTHROUGH - #if defined(__cplusplus) && __cplusplus >= 201103L - #if __has_cpp_attribute(fallthrough) - #define CYTHON_FALLTHROUGH [[fallthrough]] - #elif __has_cpp_attribute(clang::fallthrough) - #define CYTHON_FALLTHROUGH [[clang::fallthrough]] - #elif __has_cpp_attribute(gnu::fallthrough) - #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] - #endif - #endif - #ifndef CYTHON_FALLTHROUGH - #if __has_attribute(fallthrough) - #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) - #else - #define CYTHON_FALLTHROUGH - #endif - #endif - #if defined(__clang__ ) && defined(__apple_build_version__) - #if __apple_build_version__ < 7000000 - #undef CYTHON_FALLTHROUGH - #define CYTHON_FALLTHROUGH - #endif - #endif -#endif - -#ifndef CYTHON_INLINE - #if defined(__clang__) - #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) - #elif defined(__GNUC__) - #define CYTHON_INLINE __inline__ - #elif defined(_MSC_VER) - #define CYTHON_INLINE __inline - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_INLINE inline - #else - #define CYTHON_INLINE - #endif -#endif - -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif -#define __PYX_BUILD_PY_SSIZE_T "n" -#define CYTHON_FORMAT_SSIZE_T "z" -#if PY_MAJOR_VERSION < 3 - #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) - #define __Pyx_DefaultClassType PyClass_Type -#else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" -#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#endif - #define __Pyx_DefaultClassType PyType_Type -#endif -#ifndef Py_TPFLAGS_CHECKTYPES - #define Py_TPFLAGS_CHECKTYPES 0 -#endif -#ifndef Py_TPFLAGS_HAVE_INDEX - #define Py_TPFLAGS_HAVE_INDEX 0 -#endif -#ifndef Py_TPFLAGS_HAVE_NEWBUFFER - #define Py_TPFLAGS_HAVE_NEWBUFFER 0 -#endif -#ifndef Py_TPFLAGS_HAVE_FINALIZE - #define Py_TPFLAGS_HAVE_FINALIZE 0 -#endif -#ifndef METH_STACKLESS - #define METH_STACKLESS 0 -#endif -#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) - #ifndef METH_FASTCALL - #define METH_FASTCALL 0x80 - #endif - typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); - typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, - Py_ssize_t nargs, PyObject *kwnames); -#else - #define __Pyx_PyCFunctionFast _PyCFunctionFast - #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords -#endif -#if CYTHON_FAST_PYCCALL -#define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) -#else -#define __Pyx_PyFastCFunction_Check(func) 0 -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) - #define PyObject_Malloc(s) PyMem_Malloc(s) - #define PyObject_Free(p) PyMem_Free(p) - #define PyObject_Realloc(p) PyMem_Realloc(p) -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 - #define PyMem_RawMalloc(n) PyMem_Malloc(n) - #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) - #define PyMem_RawFree(p) PyMem_Free(p) -#endif -#if CYTHON_COMPILING_IN_PYSTON - #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) - #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) -#else - #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) - #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) -#endif -#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 - #define __Pyx_PyThreadState_Current PyThreadState_GET() -#elif PY_VERSION_HEX >= 0x03060000 - #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() -#elif PY_VERSION_HEX >= 0x03000000 - #define __Pyx_PyThreadState_Current PyThreadState_GET() -#else - #define __Pyx_PyThreadState_Current _PyThreadState_Current -#endif -#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) -#include "pythread.h" -#define Py_tss_NEEDS_INIT 0 -typedef int Py_tss_t; -static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { - *key = PyThread_create_key(); - return 0; -} -static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { - Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); - *key = Py_tss_NEEDS_INIT; - return key; -} -static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { - PyObject_Free(key); -} -static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { - return *key != Py_tss_NEEDS_INIT; -} -static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { - PyThread_delete_key(*key); - *key = Py_tss_NEEDS_INIT; -} -static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { - return PyThread_set_key_value(*key, value); -} -static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - return PyThread_get_key_value(*key); -} -#endif -#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) -#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) -#else -#define __Pyx_PyDict_NewPresized(n) PyDict_New() -#endif -#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION - #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) - #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) -#else - #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) - #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS -#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) -#else -#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) -#endif -#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) - #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #endif -#else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 - #define PyUnicode_2BYTE_KIND 2 - #define PyUnicode_4BYTE_KIND 4 - #define __Pyx_PyUnicode_READY(op) (0) - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) - #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) - #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) - #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) -#endif -#if CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) - #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) -#else - #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) - #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ - PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) - #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) - #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) - #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) -#endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) -#else - #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) -#endif -#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) - #define PyObject_ASCII(o) PyObject_Repr(o) -#endif -#if PY_MAJOR_VERSION >= 3 - #define PyBaseString_Type PyUnicode_Type - #define PyStringObject PyUnicodeObject - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str -#endif -#endif -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -#else - #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) - #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) -#endif -#ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) -#endif -#if PY_VERSION_HEX >= 0x030900A4 - #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -#else - #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -#endif -#if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) -#else - #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) -#endif -#if PY_MAJOR_VERSION >= 3 - #define PyIntObject PyLongObject - #define PyInt_Type PyLong_Type - #define PyInt_Check(op) PyLong_Check(op) - #define PyInt_CheckExact(op) PyLong_CheckExact(op) - #define PyInt_FromString PyLong_FromString - #define PyInt_FromUnicode PyLong_FromUnicode - #define PyInt_FromLong PyLong_FromLong - #define PyInt_FromSize_t PyLong_FromSize_t - #define PyInt_FromSsize_t PyLong_FromSsize_t - #define PyInt_AsLong PyLong_AsLong - #define PyInt_AS_LONG PyLong_AS_LONG - #define PyInt_AsSsize_t PyLong_AsSsize_t - #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask - #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask - #define PyNumber_Int PyNumber_Long -#endif -#if PY_MAJOR_VERSION >= 3 - #define PyBoolObject PyLongObject -#endif -#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY - #ifndef PyUnicode_InternFromString - #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) - #endif -#endif -#if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong - #define __Pyx_PyInt_AsHash_t PyInt_AsLong -#else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t - #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -#endif -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) -#else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) -#endif -#if CYTHON_USE_ASYNC_SLOTS - #if PY_VERSION_HEX >= 0x030500B1 - #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods - #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) - #else - #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) - #endif -#else - #define __Pyx_PyType_AsAsync(obj) NULL -#endif -#ifndef __Pyx_PyAsyncMethodsStruct - typedef struct { - unaryfunc am_await; - unaryfunc am_aiter; - unaryfunc am_anext; - } __Pyx_PyAsyncMethodsStruct; -#endif - -#if defined(WIN32) || defined(MS_WINDOWS) - #define _USE_MATH_DEFINES -#endif -#include -#ifdef NAN -#define __PYX_NAN() ((float) NAN) -#else -static CYTHON_INLINE float __PYX_NAN() { - float value; - memset(&value, 0xFF, sizeof(value)); - return value; -} -#endif -#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) -#define __Pyx_truncl trunc -#else -#define __Pyx_truncl truncl -#endif - -#define __PYX_MARK_ERR_POS(f_index, lineno) \ - { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } -#define __PYX_ERR(f_index, lineno, Ln_error) \ - { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - -#ifndef __PYX_EXTERN_C - #ifdef __cplusplus - #define __PYX_EXTERN_C extern "C" - #else - #define __PYX_EXTERN_C extern - #endif -#endif - -#define __PYX_HAVE__ssh__helper -#define __PYX_HAVE_API__ssh__helper -/* Early includes */ -#include -#include -#include -#include "libssh/libssh.h" -#ifdef _OPENMP -#include -#endif /* _OPENMP */ - -#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) -#define CYTHON_WITHOUT_ASSERTIONS -#endif - -typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; - const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; - -#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) -#define __PYX_DEFAULT_STRING_ENCODING "" -#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString -#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize -#define __Pyx_uchar_cast(c) ((unsigned char)c) -#define __Pyx_long_cast(x) ((long)x) -#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ - (sizeof(type) < sizeof(Py_ssize_t)) ||\ - (sizeof(type) > sizeof(Py_ssize_t) &&\ - likely(v < (type)PY_SSIZE_T_MAX ||\ - v == (type)PY_SSIZE_T_MAX) &&\ - (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ - v == (type)PY_SSIZE_T_MIN))) ||\ - (sizeof(type) == sizeof(Py_ssize_t) &&\ - (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ - v == (type)PY_SSIZE_T_MAX))) ) -static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { - return (size_t) i < (size_t) limit; -} -#if defined (__cplusplus) && __cplusplus >= 201103L - #include - #define __Pyx_sst_abs(value) std::abs(value) -#elif SIZEOF_INT >= SIZEOF_SIZE_T - #define __Pyx_sst_abs(value) abs(value) -#elif SIZEOF_LONG >= SIZEOF_SIZE_T - #define __Pyx_sst_abs(value) labs(value) -#elif defined (_MSC_VER) - #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) -#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define __Pyx_sst_abs(value) llabs(value) -#elif defined (__GNUC__) - #define __Pyx_sst_abs(value) __builtin_llabs(value) -#else - #define __Pyx_sst_abs(value) ((value<0) ? -value : value) -#endif -static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); -static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); -#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) -#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) -#define __Pyx_PyBytes_FromString PyBytes_FromString -#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString - #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize -#else - #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString - #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize -#endif -#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) -#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) -#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) -#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) -#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) -static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { - const Py_UNICODE *u_end = u; - while (*u_end++) ; - return (size_t)(u_end - u - 1); -} -#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) -#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode -#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode -#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) -#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) -static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); -static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); -#define __Pyx_PySequence_Tuple(obj)\ - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) -static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -#if CYTHON_ASSUME_SAFE_MACROS -#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) -#else -#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) -#endif -#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) -#else -#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) -#endif -#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII -static int __Pyx_sys_getdefaultencoding_not_ascii; -static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys; - PyObject* default_encoding = NULL; - PyObject* ascii_chars_u = NULL; - PyObject* ascii_chars_b = NULL; - const char* default_encoding_c; - sys = PyImport_ImportModule("sys"); - if (!sys) goto bad; - default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); - Py_DECREF(sys); - if (!default_encoding) goto bad; - default_encoding_c = PyBytes_AsString(default_encoding); - if (!default_encoding_c) goto bad; - if (strcmp(default_encoding_c, "ascii") == 0) { - __Pyx_sys_getdefaultencoding_not_ascii = 0; - } else { - char ascii_chars[128]; - int c; - for (c = 0; c < 128; c++) { - ascii_chars[c] = c; - } - __Pyx_sys_getdefaultencoding_not_ascii = 1; - ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); - if (!ascii_chars_u) goto bad; - ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); - if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { - PyErr_Format( - PyExc_ValueError, - "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", - default_encoding_c); - goto bad; - } - Py_DECREF(ascii_chars_u); - Py_DECREF(ascii_chars_b); - } - Py_DECREF(default_encoding); - return 0; -bad: - Py_XDECREF(default_encoding); - Py_XDECREF(ascii_chars_u); - Py_XDECREF(ascii_chars_b); - return -1; -} -#endif -#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) -#else -#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) -#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT -static char* __PYX_DEFAULT_STRING_ENCODING; -static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys; - PyObject* default_encoding = NULL; - char* default_encoding_c; - sys = PyImport_ImportModule("sys"); - if (!sys) goto bad; - default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); - Py_DECREF(sys); - if (!default_encoding) goto bad; - default_encoding_c = PyBytes_AsString(default_encoding); - if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); - if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; - strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); - Py_DECREF(default_encoding); - return 0; -bad: - Py_XDECREF(default_encoding); - return -1; -} -#endif -#endif - - -/* Test for GCC > 2.95 */ -#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) - #define likely(x) __builtin_expect(!!(x), 1) - #define unlikely(x) __builtin_expect(!!(x), 0) -#else /* !__GNUC__ or GCC < 2.95 */ - #define likely(x) (x) - #define unlikely(x) (x) -#endif /* __GNUC__ */ -static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } - -static PyObject *__pyx_m = NULL; -static PyObject *__pyx_d; -static PyObject *__pyx_b; -static PyObject *__pyx_cython_runtime = NULL; -static PyObject *__pyx_empty_tuple; -static PyObject *__pyx_empty_bytes; -static PyObject *__pyx_empty_unicode; -static int __pyx_lineno; -static int __pyx_clineno = 0; -static const char * __pyx_cfilenm= __FILE__; -static const char *__pyx_filename; - - -static const char *__pyx_f[] = { - "ssh/helper.pyx", - "ssh/session.pxd", -}; - -/*--- Type declarations ---*/ -struct __pyx_obj_3ssh_7session_Session; - -/* "session.pxd":19 - * cimport c_ssh - * - * cdef class Session: # <<<<<<<<<<<<<< - * cdef c_ssh.ssh_session _session - * cdef c_ssh.socket_t _sock - */ -struct __pyx_obj_3ssh_7session_Session { - PyObject_HEAD - ssh_session _session; - socket_t _sock; - PyObject *sock; -}; - - -/* --- Runtime support code (head) --- */ -/* Refnanny.proto */ -#ifndef CYTHON_REFNANNY - #define CYTHON_REFNANNY 0 -#endif -#if CYTHON_REFNANNY - typedef struct { - void (*INCREF)(void*, PyObject*, int); - void (*DECREF)(void*, PyObject*, int); - void (*GOTREF)(void*, PyObject*, int); - void (*GIVEREF)(void*, PyObject*, int); - void* (*SetupContext)(const char*, int, const char*); - void (*FinishContext)(void**); - } __Pyx_RefNannyAPIStruct; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); - #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; -#ifdef WITH_THREAD - #define __Pyx_RefNannySetupContext(name, acquire_gil)\ - if (acquire_gil) {\ - PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ - PyGILState_Release(__pyx_gilstate_save);\ - } else {\ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ - } -#else - #define __Pyx_RefNannySetupContext(name, acquire_gil)\ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) -#endif - #define __Pyx_RefNannyFinishContext()\ - __Pyx_RefNanny->FinishContext(&__pyx_refnanny) - #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) - #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) - #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) - #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) -#else - #define __Pyx_RefNannyDeclarations - #define __Pyx_RefNannySetupContext(name, acquire_gil) - #define __Pyx_RefNannyFinishContext() - #define __Pyx_INCREF(r) Py_INCREF(r) - #define __Pyx_DECREF(r) Py_DECREF(r) - #define __Pyx_GOTREF(r) - #define __Pyx_GIVEREF(r) - #define __Pyx_XINCREF(r) Py_XINCREF(r) - #define __Pyx_XDECREF(r) Py_XDECREF(r) - #define __Pyx_XGOTREF(r) - #define __Pyx_XGIVEREF(r) -#endif -#define __Pyx_XDECREF_SET(r, v) do {\ - PyObject *tmp = (PyObject *) r;\ - r = v; __Pyx_XDECREF(tmp);\ - } while (0) -#define __Pyx_DECREF_SET(r, v) do {\ - PyObject *tmp = (PyObject *) r;\ - r = v; __Pyx_DECREF(tmp);\ - } while (0) -#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) -#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) - -/* RaiseArgTupleInvalid.proto */ -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); - -/* RaiseDoubleKeywords.proto */ -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); - -/* ParseKeywords.proto */ -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ - PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ - const char* function_name); - -/* ArgTypeTest.proto */ -#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ - ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ - __Pyx__ArgTypeTest(obj, type, name, exact)) -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); - -/* PyObjectGetAttrStr.proto */ -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); -#else -#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) -#endif - -/* GetBuiltinName.proto */ -static PyObject *__Pyx_GetBuiltinName(PyObject *name); - -/* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) -#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ - (version_var) = __PYX_GET_DICT_VERSION(dict);\ - (cache_var) = (value); -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ - static PY_UINT64_T __pyx_dict_version = 0;\ - static PyObject *__pyx_dict_cached_value = NULL;\ - if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ - (VAR) = __pyx_dict_cached_value;\ - } else {\ - (VAR) = __pyx_dict_cached_value = (LOOKUP);\ - __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ - }\ -} -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); -static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); -static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); -#else -#define __PYX_GET_DICT_VERSION(dict) (0) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); -#endif - -/* GetModuleGlobalName.proto */ -#if CYTHON_USE_DICT_VERSIONS -#define __Pyx_GetModuleGlobalName(var, name) {\ - static PY_UINT64_T __pyx_dict_version = 0;\ - static PyObject *__pyx_dict_cached_value = NULL;\ - (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ - (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ - __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ -} -#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ - PY_UINT64_T __pyx_dict_version;\ - PyObject *__pyx_dict_cached_value;\ - (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ -} -static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); -#else -#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) -#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) -static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); -#endif - -/* PyFunctionFastCall.proto */ -#if CYTHON_FAST_PYCALL -#define __Pyx_PyFunction_FastCall(func, args, nargs)\ - __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) -#if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); -#else -#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) -#endif -#define __Pyx_BUILD_ASSERT_EXPR(cond)\ - (sizeof(char [1 - 2*!(cond)]) - 1) -#ifndef Py_MEMBER_SIZE -#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) -#endif - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ - ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -#endif - -/* PyCFunctionFastCall.proto */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); -#else -#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) -#endif - -/* PyObjectCall.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - -/* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto -#define __PYX_HAVE_RT_ImportType_proto -enum __Pyx_ImportType_CheckSize { - __Pyx_ImportType_CheckSize_Error = 0, - __Pyx_ImportType_CheckSize_Warn = 1, - __Pyx_ImportType_CheckSize_Ignore = 2 -}; -static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); -#endif - -/* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); - -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); - -/* PyThreadStateGet.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; -#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; -#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type -#else -#define __Pyx_PyThreadState_declare -#define __Pyx_PyThreadState_assign -#define __Pyx_PyErr_Occurred() PyErr_Occurred() -#endif - -/* PyErrFetchRestore.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) -#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) -#else -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#endif -#else -#define __Pyx_PyErr_Clear() PyErr_Clear() -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) -#endif - -/* CLineInTraceback.proto */ -#ifdef CYTHON_CLINE_IN_TRACEBACK -#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) -#else -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); -#endif - -/* CodeObjectCache.proto */ -typedef struct { - PyCodeObject* code_object; - int code_line; -} __Pyx_CodeObjectCacheEntry; -struct __Pyx_CodeObjectCache { - int count; - int max_count; - __Pyx_CodeObjectCacheEntry* entries; -}; -static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; -static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); -static PyCodeObject *__pyx_find_code_object(int code_line); -static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - -/* AddTraceback.proto */ -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -/* CIntFromPy.proto */ -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -/* FastTypeChecks.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); -static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); -static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); -#else -#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) -#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) -#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) -#endif -#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) - -/* CheckBinaryVersion.proto */ -static int __Pyx_check_binary_version(void); - -/* InitStrings.proto */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); - - -/* Module declarations from 'libc.stddef' */ - -/* Module declarations from 'libc.time' */ - -/* Module declarations from 'posix.types' */ - -/* Module declarations from 'ssh.c_ssh' */ - -/* Module declarations from 'ssh.session' */ -static PyTypeObject *__pyx_ptype_3ssh_7session_Session = 0; - -/* Module declarations from 'ssh.helper' */ -#define __Pyx_MODULE_NAME "ssh.helper" -extern int __pyx_module_is_main_ssh__helper; -int __pyx_module_is_main_ssh__helper = 0; - -/* Implementation of 'ssh.helper' */ -static const char __pyx_k_main[] = "__main__"; -static const char __pyx_k_name[] = "__name__"; -static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_import[] = "__import__"; -static const char __pyx_k_select[] = "select"; -static const char __pyx_k_socket[] = "_socket"; -static const char __pyx_k_readfds[] = "readfds"; -static const char __pyx_k_session[] = "session"; -static const char __pyx_k_timeout[] = "timeout"; -static const char __pyx_k_writefds[] = "writefds"; -static const char __pyx_k_directions[] = "directions"; -static const char __pyx_k_ssh_helper[] = "ssh.helper"; -static const char __pyx_k_wait_socket[] = "wait_socket"; -static const char __pyx_k_ssh_helper_pyx[] = "ssh/helper.pyx"; -static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; -static PyObject *__pyx_n_s_cline_in_traceback; -static PyObject *__pyx_n_s_directions; -static PyObject *__pyx_n_s_import; -static PyObject *__pyx_n_s_main; -static PyObject *__pyx_n_s_name; -static PyObject *__pyx_n_s_readfds; -static PyObject *__pyx_n_s_select; -static PyObject *__pyx_n_s_session; -static PyObject *__pyx_n_s_socket; -static PyObject *__pyx_n_s_ssh_helper; -static PyObject *__pyx_kp_s_ssh_helper_pyx; -static PyObject *__pyx_n_s_test; -static PyObject *__pyx_n_s_timeout; -static PyObject *__pyx_n_s_wait_socket; -static PyObject *__pyx_n_s_writefds; -static PyObject *__pyx_pf_3ssh_6helper_wait_socket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__socket, struct __pyx_obj_3ssh_7session_Session *__pyx_v_session, PyObject *__pyx_v_timeout); /* proto */ -static PyObject *__pyx_int_0; -static PyObject *__pyx_int_1; -static PyObject *__pyx_tuple_; -static PyObject *__pyx_codeobj__2; -/* Late includes */ - -/* "ssh/helper.pyx":24 - * - * - * def wait_socket(_socket not None, Session session, timeout=1): # <<<<<<<<<<<<<< - * """Helper function for testing non-blocking mode. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_3ssh_6helper_1wait_socket(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_3ssh_6helper_wait_socket[] = "wait_socket(_socket, Session session, timeout=1)\nHelper function for testing non-blocking mode.\n\n This function blocks the calling thread for seconds -\n to be used only for testing purposes.\n "; -static PyMethodDef __pyx_mdef_3ssh_6helper_1wait_socket = {"wait_socket", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ssh_6helper_1wait_socket, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ssh_6helper_wait_socket}; -static PyObject *__pyx_pw_3ssh_6helper_1wait_socket(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v__socket = 0; - struct __pyx_obj_3ssh_7session_Session *__pyx_v_session = 0; - PyObject *__pyx_v_timeout = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("wait_socket (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_socket,&__pyx_n_s_session,&__pyx_n_s_timeout,0}; - PyObject* values[3] = {0,0,0}; - values[2] = ((PyObject *)__pyx_int_1); - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_socket)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_session)) != 0)) kw_args--; - else { - __Pyx_RaiseArgtupleInvalid("wait_socket", 0, 2, 3, 1); __PYX_ERR(0, 24, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (kw_args > 0) { - PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout); - if (value) { values[2] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_socket") < 0)) __PYX_ERR(0, 24, __pyx_L3_error) - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v__socket = values[0]; - __pyx_v_session = ((struct __pyx_obj_3ssh_7session_Session *)values[1]); - __pyx_v_timeout = values[2]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("wait_socket", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("ssh.helper.wait_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(((PyObject *)__pyx_v__socket) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "_socket"); __PYX_ERR(0, 24, __pyx_L1_error) - } - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_session), __pyx_ptype_3ssh_7session_Session, 1, "session", 0))) __PYX_ERR(0, 24, __pyx_L1_error) - __pyx_r = __pyx_pf_3ssh_6helper_wait_socket(__pyx_self, __pyx_v__socket, __pyx_v_session, __pyx_v_timeout); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_3ssh_6helper_wait_socket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__socket, struct __pyx_obj_3ssh_7session_Session *__pyx_v_session, PyObject *__pyx_v_timeout) { - int __pyx_v_directions; - PyObject *__pyx_v_readfds = NULL; - PyObject *__pyx_v_writefds = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wait_socket", 0); - - /* "ssh/helper.pyx":30 - * to be used only for testing purposes. - * """ - * cdef int directions = ssh_get_poll_flags(session._session) # <<<<<<<<<<<<<< - * if directions == 0: - * return 0 - */ - __pyx_v_directions = ssh_get_poll_flags(__pyx_v_session->_session); - - /* "ssh/helper.pyx":31 - * """ - * cdef int directions = ssh_get_poll_flags(session._session) - * if directions == 0: # <<<<<<<<<<<<<< - * return 0 - * readfds = (_socket,) \ - */ - __pyx_t_1 = ((__pyx_v_directions == 0) != 0); - if (__pyx_t_1) { - - /* "ssh/helper.pyx":32 - * cdef int directions = ssh_get_poll_flags(session._session) - * if directions == 0: - * return 0 # <<<<<<<<<<<<<< - * readfds = (_socket,) \ - * if (directions & SSH_READ_PENDING) else () - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_int_0); - __pyx_r = __pyx_int_0; - goto __pyx_L0; - - /* "ssh/helper.pyx":31 - * """ - * cdef int directions = ssh_get_poll_flags(session._session) - * if directions == 0: # <<<<<<<<<<<<<< - * return 0 - * readfds = (_socket,) \ - */ - } - - /* "ssh/helper.pyx":34 - * return 0 - * readfds = (_socket,) \ - * if (directions & SSH_READ_PENDING) else () # <<<<<<<<<<<<<< - * writefds = (_socket,) \ - * if (directions & SSH_WRITE_PENDING) else () - */ - if (((__pyx_v_directions & SSH_READ_PENDING) != 0)) { - - /* "ssh/helper.pyx":33 - * if directions == 0: - * return 0 - * readfds = (_socket,) \ # <<<<<<<<<<<<<< - * if (directions & SSH_READ_PENDING) else () - * writefds = (_socket,) \ - */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v__socket); - __Pyx_GIVEREF(__pyx_v__socket); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__socket); - __pyx_t_2 = __pyx_t_3; - __pyx_t_3 = 0; - } else { - - /* "ssh/helper.pyx":34 - * return 0 - * readfds = (_socket,) \ - * if (directions & SSH_READ_PENDING) else () # <<<<<<<<<<<<<< - * writefds = (_socket,) \ - * if (directions & SSH_WRITE_PENDING) else () - */ - __Pyx_INCREF(__pyx_empty_tuple); - __pyx_t_2 = __pyx_empty_tuple; - } - __pyx_v_readfds = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; - - /* "ssh/helper.pyx":36 - * if (directions & SSH_READ_PENDING) else () - * writefds = (_socket,) \ - * if (directions & SSH_WRITE_PENDING) else () # <<<<<<<<<<<<<< - * return select(readfds, writefds, (), timeout) - */ - if (((__pyx_v_directions & SSH_WRITE_PENDING) != 0)) { - - /* "ssh/helper.pyx":35 - * readfds = (_socket,) \ - * if (directions & SSH_READ_PENDING) else () - * writefds = (_socket,) \ # <<<<<<<<<<<<<< - * if (directions & SSH_WRITE_PENDING) else () - * return select(readfds, writefds, (), timeout) - */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v__socket); - __Pyx_GIVEREF(__pyx_v__socket); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__socket); - __pyx_t_2 = __pyx_t_3; - __pyx_t_3 = 0; - } else { - - /* "ssh/helper.pyx":36 - * if (directions & SSH_READ_PENDING) else () - * writefds = (_socket,) \ - * if (directions & SSH_WRITE_PENDING) else () # <<<<<<<<<<<<<< - * return select(readfds, writefds, (), timeout) - */ - __Pyx_INCREF(__pyx_empty_tuple); - __pyx_t_2 = __pyx_empty_tuple; - } - __pyx_v_writefds = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; - - /* "ssh/helper.pyx":37 - * writefds = (_socket,) \ - * if (directions & SSH_WRITE_PENDING) else () - * return select(readfds, writefds, (), timeout) # <<<<<<<<<<<<<< - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_select); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_5 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_readfds, __pyx_v_writefds, __pyx_empty_tuple, __pyx_v_timeout}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_readfds, __pyx_v_writefds, __pyx_empty_tuple, __pyx_v_timeout}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; - } - __Pyx_INCREF(__pyx_v_readfds); - __Pyx_GIVEREF(__pyx_v_readfds); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_readfds); - __Pyx_INCREF(__pyx_v_writefds); - __Pyx_GIVEREF(__pyx_v_writefds); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_writefds); - __Pyx_INCREF(__pyx_empty_tuple); - __Pyx_GIVEREF(__pyx_empty_tuple); - PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_empty_tuple); - __Pyx_INCREF(__pyx_v_timeout); - __Pyx_GIVEREF(__pyx_v_timeout); - PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_timeout); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "ssh/helper.pyx":24 - * - * - * def wait_socket(_socket not None, Session session, timeout=1): # <<<<<<<<<<<<<< - * """Helper function for testing non-blocking mode. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("ssh.helper.wait_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_readfds); - __Pyx_XDECREF(__pyx_v_writefds); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyMethodDef __pyx_methods[] = { - {0, 0, 0, 0} -}; - -#if PY_MAJOR_VERSION >= 3 -#if CYTHON_PEP489_MULTI_PHASE_INIT -static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ -static int __pyx_pymod_exec_helper(PyObject* module); /*proto*/ -static PyModuleDef_Slot __pyx_moduledef_slots[] = { - {Py_mod_create, (void*)__pyx_pymod_create}, - {Py_mod_exec, (void*)__pyx_pymod_exec_helper}, - {0, NULL} -}; -#endif - -static struct PyModuleDef __pyx_moduledef = { - PyModuleDef_HEAD_INIT, - "helper", - 0, /* m_doc */ - #if CYTHON_PEP489_MULTI_PHASE_INIT - 0, /* m_size */ - #else - -1, /* m_size */ - #endif - __pyx_methods /* m_methods */, - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_moduledef_slots, /* m_slots */ - #else - NULL, /* m_reload */ - #endif - NULL, /* m_traverse */ - NULL, /* m_clear */ - NULL /* m_free */ -}; -#endif -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) - #define CYTHON_SMALL_CODE __attribute__((cold)) -#else - #define CYTHON_SMALL_CODE -#endif -#endif - -static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_directions, __pyx_k_directions, sizeof(__pyx_k_directions), 0, 0, 1, 1}, - {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_s_readfds, __pyx_k_readfds, sizeof(__pyx_k_readfds), 0, 0, 1, 1}, - {&__pyx_n_s_select, __pyx_k_select, sizeof(__pyx_k_select), 0, 0, 1, 1}, - {&__pyx_n_s_session, __pyx_k_session, sizeof(__pyx_k_session), 0, 0, 1, 1}, - {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1}, - {&__pyx_n_s_ssh_helper, __pyx_k_ssh_helper, sizeof(__pyx_k_ssh_helper), 0, 0, 1, 1}, - {&__pyx_kp_s_ssh_helper_pyx, __pyx_k_ssh_helper_pyx, sizeof(__pyx_k_ssh_helper_pyx), 0, 0, 1, 0}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1}, - {&__pyx_n_s_wait_socket, __pyx_k_wait_socket, sizeof(__pyx_k_wait_socket), 0, 0, 1, 1}, - {&__pyx_n_s_writefds, __pyx_k_writefds, sizeof(__pyx_k_writefds), 0, 0, 1, 1}, - {0, 0, 0, 0, 0, 0, 0} -}; -static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - return 0; -} - -static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - - /* "ssh/helper.pyx":24 - * - * - * def wait_socket(_socket not None, Session session, timeout=1): # <<<<<<<<<<<<<< - * """Helper function for testing non-blocking mode. - * - */ - __pyx_tuple_ = PyTuple_Pack(6, __pyx_n_s_socket, __pyx_n_s_session, __pyx_n_s_timeout, __pyx_n_s_directions, __pyx_n_s_readfds, __pyx_n_s_writefds); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 24, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple_); - __Pyx_GIVEREF(__pyx_tuple_); - __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ssh_helper_pyx, __pyx_n_s_wait_socket, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 24, __pyx_L1_error) - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; - __Pyx_RefNannyFinishContext(); - return -1; -} - -static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { - if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); - __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -} - -static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ -static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ -static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ -static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ -static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ -static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ -static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ - -static int __Pyx_modinit_global_init_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); - /*--- Global init code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_variable_export_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); - /*--- Variable export code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_function_export_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); - /*--- Function export code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule("ssh.session"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_3ssh_7session_Session = __Pyx_ImportType(__pyx_t_1, "ssh.session", "Session", sizeof(struct __pyx_obj_3ssh_7session_Session), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_3ssh_7session_Session) __PYX_ERR(1, 19, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_RefNannyFinishContext(); - return -1; -} - -static int __Pyx_modinit_variable_import_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); - /*--- Variable import code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - - -#ifndef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -#elif PY_MAJOR_VERSION < 3 -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" void -#else -#define __Pyx_PyMODINIT_FUNC void -#endif -#else -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * -#else -#define __Pyx_PyMODINIT_FUNC PyObject * -#endif -#endif - - -#if PY_MAJOR_VERSION < 3 -__Pyx_PyMODINIT_FUNC inithelper(void) CYTHON_SMALL_CODE; /*proto*/ -__Pyx_PyMODINIT_FUNC inithelper(void) -#else -__Pyx_PyMODINIT_FUNC PyInit_helper(void) CYTHON_SMALL_CODE; /*proto*/ -__Pyx_PyMODINIT_FUNC PyInit_helper(void) -#if CYTHON_PEP489_MULTI_PHASE_INIT -{ - return PyModuleDef_Init(&__pyx_moduledef); -} -static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { - #if PY_VERSION_HEX >= 0x030700A1 - static PY_INT64_T main_interpreter_id = -1; - PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); - if (main_interpreter_id == -1) { - main_interpreter_id = current_id; - return (unlikely(current_id == -1)) ? -1 : 0; - } else if (unlikely(main_interpreter_id != current_id)) - #else - static PyInterpreterState *main_interpreter = NULL; - PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; - if (!main_interpreter) { - main_interpreter = current_interpreter; - } else if (unlikely(main_interpreter != current_interpreter)) - #endif - { - PyErr_SetString( - PyExc_ImportError, - "Interpreter change detected - this module can only be loaded into one interpreter per process."); - return -1; - } - return 0; -} -static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { - PyObject *value = PyObject_GetAttrString(spec, from_name); - int result = 0; - if (likely(value)) { - if (allow_none || value != Py_None) { - result = PyDict_SetItemString(moddict, to_name, value); - } - Py_DECREF(value); - } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Clear(); - } else { - result = -1; - } - return result; -} -static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { - PyObject *module = NULL, *moddict, *modname; - if (__Pyx_check_single_interpreter()) - return NULL; - if (__pyx_m) - return __Pyx_NewRef(__pyx_m); - modname = PyObject_GetAttrString(spec, "name"); - if (unlikely(!modname)) goto bad; - module = PyModule_NewObject(modname); - Py_DECREF(modname); - if (unlikely(!module)) goto bad; - moddict = PyModule_GetDict(module); - if (unlikely(!moddict)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; - return module; -bad: - Py_XDECREF(module); - return NULL; -} - - -static CYTHON_SMALL_CODE int __pyx_pymod_exec_helper(PyObject *__pyx_pyinit_module) -#endif -#endif -{ - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { - if (__pyx_m == __pyx_pyinit_module) return 0; - PyErr_SetString(PyExc_RuntimeError, "Module 'helper' has already been imported. Re-initialisation is not supported."); - return -1; - } - #elif PY_MAJOR_VERSION >= 3 - if (__pyx_m) return __Pyx_NewRef(__pyx_m); - #endif - #if CYTHON_REFNANNY -__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); -if (!__Pyx_RefNanny) { - PyErr_Clear(); - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); - if (!__Pyx_RefNanny) - Py_FatalError("failed to import 'refnanny' module"); -} -#endif - __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_helper(void)", 0); - if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #ifdef __Pxy_PyFrame_Initialize_Offsets - __Pxy_PyFrame_Initialize_Offsets(); - #endif - __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) - #ifdef __Pyx_CyFunction_USED - if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_FusedFunction_USED - if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Coroutine_USED - if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Generator_USED - if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_AsyncGen_USED - if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_StopAsyncIteration_USED - if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ - #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - #ifdef WITH_THREAD /* Python build with threading support? */ - PyEval_InitThreads(); - #endif - #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; - Py_INCREF(__pyx_m); - #else - #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4("helper", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); - #else - __pyx_m = PyModule_Create(&__pyx_moduledef); - #endif - if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_b); - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_cython_runtime); - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); - /*--- Initialize various global constants etc. ---*/ - if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) - if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - if (__pyx_module_is_main_ssh__helper) { - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - } - #if PY_MAJOR_VERSION >= 3 - { - PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) - if (!PyDict_GetItemString(modules, "ssh.helper")) { - if (unlikely(PyDict_SetItemString(modules, "ssh.helper", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) - } - } - #endif - /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); - (void)__Pyx_modinit_type_init_code(); - if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - - /* "ssh/helper.pyx":17 - * # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * from select import select # <<<<<<<<<<<<<< - * - * from session cimport Session - */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_select); - __Pyx_GIVEREF(__pyx_n_s_select); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_select); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_select, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_select); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_select, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "ssh/helper.pyx":24 - * - * - * def wait_socket(_socket not None, Session session, timeout=1): # <<<<<<<<<<<<<< - * """Helper function for testing non-blocking mode. - * - */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3ssh_6helper_1wait_socket, NULL, __pyx_n_s_ssh_helper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_wait_socket, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "ssh/helper.pyx":1 - * # This file is part of ssh-python. # <<<<<<<<<<<<<< - * # Copyright (C) 2018 Panos Kittenis - * # - */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /*--- Wrapped vars code ---*/ - - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - if (__pyx_m) { - if (__pyx_d) { - __Pyx_AddTraceback("init ssh.helper", __pyx_clineno, __pyx_lineno, __pyx_filename); - } - Py_CLEAR(__pyx_m); - } else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_ImportError, "init ssh.helper"); - } - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - #if CYTHON_PEP489_MULTI_PHASE_INIT - return (__pyx_m != NULL) ? 0 : -1; - #elif PY_MAJOR_VERSION >= 3 - return __pyx_m; - #else - return; - #endif -} - -/* --- Runtime support code --- */ -/* Refnanny */ -#if CYTHON_REFNANNY -static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { - PyObject *m = NULL, *p = NULL; - void *r = NULL; - m = PyImport_ImportModule(modname); - if (!m) goto end; - p = PyObject_GetAttrString(m, "RefNannyAPI"); - if (!p) goto end; - r = PyLong_AsVoidPtr(p); -end: - Py_XDECREF(p); - Py_XDECREF(m); - return (__Pyx_RefNannyAPIStruct *)r; -} -#endif - -/* RaiseArgTupleInvalid */ -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *more_or_less; - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; - } else { - num_expected = num_max; - more_or_less = "at most"; - } - if (exact) { - more_or_less = "exactly"; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); -} - -/* RaiseDoubleKeywords */ -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() got multiple values for keyword argument '%U'", func_name, kw_name); - #else - "%s() got multiple values for keyword argument '%s'", func_name, - PyString_AsString(kw_name)); - #endif -} - -/* ParseKeywords */ -static int __Pyx_ParseOptionalKeywords( - PyObject *kwds, - PyObject **argnames[], - PyObject *kwds2, - PyObject *values[], - Py_ssize_t num_pos_args, - const char* function_name) -{ - PyObject *key = 0, *value = 0; - Py_ssize_t pos = 0; - PyObject*** name; - PyObject*** first_kw_arg = argnames + num_pos_args; - while (PyDict_Next(kwds, &pos, &key, &value)) { - name = first_kw_arg; - while (*name && (**name != key)) name++; - if (*name) { - values[name-argnames] = value; - continue; - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 - if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { - values[name-argnames] = value; - break; - } - name++; - } - if (*name) continue; - else { - PyObject*** argname = argnames; - while (argname != first_kw_arg) { - if ((**argname == key) || ( - (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) - && _PyString_Eq(**argname, key))) { - goto arg_passed_twice; - } - argname++; - } - } - } else - #endif - if (likely(PyUnicode_Check(key))) { - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; - if (cmp == 0) { - values[name-argnames] = value; - break; - } - name++; - } - if (*name) continue; - else { - PyObject*** argname = argnames; - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; - if (cmp == 0) goto arg_passed_twice; - argname++; - } - } - } else - goto invalid_keyword_type; - if (kwds2) { - if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; - } else { - goto invalid_keyword; - } - } - return 0; -arg_passed_twice: - __Pyx_RaiseDoubleKeywordsError(function_name, key); - goto bad; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - goto bad; -invalid_keyword: - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif -bad: - return -1; -} - -/* ArgTypeTest */ -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) -{ - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - else if (exact) { - #if PY_MAJOR_VERSION == 2 - if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; - #endif - } - else { - if (likely(__Pyx_TypeCheck(obj, type))) return 1; - } - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); - return 0; -} - -/* PyObjectGetAttrStr */ -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_getattro)) - return tp->tp_getattro(obj, attr_name); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_getattr)) - return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); -#endif - return PyObject_GetAttr(obj, attr_name); -} -#endif - -/* GetBuiltinName */ -static PyObject *__Pyx_GetBuiltinName(PyObject *name) { - PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); - if (unlikely(!result)) { - PyErr_Format(PyExc_NameError, -#if PY_MAJOR_VERSION >= 3 - "name '%U' is not defined", name); -#else - "name '%.200s' is not defined", PyString_AS_STRING(name)); -#endif - } - return result; -} - -/* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; -} -static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { - PyObject **dictptr = NULL; - Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; - if (offset) { -#if CYTHON_COMPILING_IN_CPYTHON - dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); -#else - dictptr = _PyObject_GetDictPtr(obj); -#endif - } - return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; -} -static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) - return 0; - return obj_dict_version == __Pyx_get_object_dict_version(obj); -} -#endif - -/* GetModuleGlobalName */ -#if CYTHON_USE_DICT_VERSIONS -static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) -#else -static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) -#endif -{ - PyObject *result; -#if !CYTHON_AVOID_BORROWED_REFS -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 - result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } else if (unlikely(PyErr_Occurred())) { - return NULL; - } -#else - result = PyDict_GetItem(__pyx_d, name); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } -#endif -#else - result = PyObject_GetItem(__pyx_d, name); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } - PyErr_Clear(); -#endif - return __Pyx_GetBuiltinName(name); -} - -/* PyFunctionFastCall */ -#if CYTHON_FAST_PYCALL -static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, - PyObject *globals) { - PyFrameObject *f; - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject **fastlocals; - Py_ssize_t i; - PyObject *result; - assert(globals != NULL); - /* XXX Perhaps we should create a specialized - PyFrame_New() that doesn't take locals, but does - take builtins without sanity checking them. - */ - assert(tstate != NULL); - f = PyFrame_New(tstate, co, globals, NULL); - if (f == NULL) { - return NULL; - } - fastlocals = __Pyx_PyFrame_GetLocalsplus(f); - for (i = 0; i < na; i++) { - Py_INCREF(*args); - fastlocals[i] = *args++; - } - result = PyEval_EvalFrameEx(f,0); - ++tstate->recursion_depth; - Py_DECREF(f); - --tstate->recursion_depth; - return result; -} -#if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { - PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); - PyObject *globals = PyFunction_GET_GLOBALS(func); - PyObject *argdefs = PyFunction_GET_DEFAULTS(func); - PyObject *closure; -#if PY_MAJOR_VERSION >= 3 - PyObject *kwdefs; -#endif - PyObject *kwtuple, **k; - PyObject **d; - Py_ssize_t nd; - Py_ssize_t nk; - PyObject *result; - assert(kwargs == NULL || PyDict_Check(kwargs)); - nk = kwargs ? PyDict_Size(kwargs) : 0; - if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { - return NULL; - } - if ( -#if PY_MAJOR_VERSION >= 3 - co->co_kwonlyargcount == 0 && -#endif - likely(kwargs == NULL || nk == 0) && - co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { - if (argdefs == NULL && co->co_argcount == nargs) { - result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); - goto done; - } - else if (nargs == 0 && argdefs != NULL - && co->co_argcount == Py_SIZE(argdefs)) { - /* function called with no arguments, but all parameters have - a default value: use default values as arguments .*/ - args = &PyTuple_GET_ITEM(argdefs, 0); - result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); - goto done; - } - } - if (kwargs != NULL) { - Py_ssize_t pos, i; - kwtuple = PyTuple_New(2 * nk); - if (kwtuple == NULL) { - result = NULL; - goto done; - } - k = &PyTuple_GET_ITEM(kwtuple, 0); - pos = i = 0; - while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { - Py_INCREF(k[i]); - Py_INCREF(k[i+1]); - i += 2; - } - nk = i / 2; - } - else { - kwtuple = NULL; - k = NULL; - } - closure = PyFunction_GET_CLOSURE(func); -#if PY_MAJOR_VERSION >= 3 - kwdefs = PyFunction_GET_KW_DEFAULTS(func); -#endif - if (argdefs != NULL) { - d = &PyTuple_GET_ITEM(argdefs, 0); - nd = Py_SIZE(argdefs); - } - else { - d = NULL; - nd = 0; - } -#if PY_MAJOR_VERSION >= 3 - result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, - args, (int)nargs, - k, (int)nk, - d, (int)nd, kwdefs, closure); -#else - result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, - args, (int)nargs, - k, (int)nk, - d, (int)nd, closure); -#endif - Py_XDECREF(kwtuple); -done: - Py_LeaveRecursiveCall(); - return result; -} -#endif -#endif - -/* PyCFunctionFastCall */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { - PyCFunctionObject *func = (PyCFunctionObject*)func_obj; - PyCFunction meth = PyCFunction_GET_FUNCTION(func); - PyObject *self = PyCFunction_GET_SELF(func); - int flags = PyCFunction_GET_FLAGS(func); - assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); - assert(nargs >= 0); - assert(nargs == 0 || args != NULL); - /* _PyCFunction_FastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the - caller loses its exception */ - assert(!PyErr_Occurred()); - if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); - } else { - return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); - } -} -#endif - -/* PyObjectCall */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = func->ob_type->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - -/* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType -#define __PYX_HAVE_RT_ImportType -static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, - size_t size, enum __Pyx_ImportType_CheckSize check_size) -{ - PyObject *result = 0; - char warning[200]; - Py_ssize_t basicsize; -#ifdef Py_LIMITED_API - PyObject *py_basicsize; -#endif - result = PyObject_GetAttrString(module, class_name); - if (!result) - goto bad; - if (!PyType_Check(result)) { - PyErr_Format(PyExc_TypeError, - "%.200s.%.200s is not a type object", - module_name, class_name); - goto bad; - } -#ifndef Py_LIMITED_API - basicsize = ((PyTypeObject *)result)->tp_basicsize; -#else - py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); - if (!py_basicsize) - goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) - goto bad; -#endif - if ((size_t)basicsize < size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s size changed, may indicate binary incompatibility. " - "Expected %zd from C header, got %zd from PyObject", - module_name, class_name, size, basicsize); - goto bad; - } - if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s size changed, may indicate binary incompatibility. " - "Expected %zd from C header, got %zd from PyObject", - module_name, class_name, size, basicsize); - goto bad; - } - else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), - "%s.%s size changed, may indicate binary incompatibility. " - "Expected %zd from C header, got %zd from PyObject", - module_name, class_name, size, basicsize); - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - } - return (PyTypeObject *)result; -bad: - Py_XDECREF(result); - return NULL; -} -#endif - -/* Import */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - PyObject *empty_list = 0; - PyObject *module = 0; - PyObject *global_dict = 0; - PyObject *empty_dict = 0; - PyObject *list; - #if PY_MAJOR_VERSION < 3 - PyObject *py_import; - py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); - if (!py_import) - goto bad; - #endif - if (from_list) - list = from_list; - else { - empty_list = PyList_New(0); - if (!empty_list) - goto bad; - list = empty_list; - } - global_dict = PyModule_GetDict(__pyx_m); - if (!global_dict) - goto bad; - empty_dict = PyDict_New(); - if (!empty_dict) - goto bad; - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { - if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { - if (!PyErr_ExceptionMatches(PyExc_ImportError)) - goto bad; - PyErr_Clear(); - } - } - level = 0; - } - #endif - if (!module) { - #if PY_MAJOR_VERSION < 3 - PyObject *py_level = PyInt_FromLong(level); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); - Py_DECREF(py_level); - #else - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, level); - #endif - } - } -bad: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(py_import); - #endif - Py_XDECREF(empty_list); - Py_XDECREF(empty_dict); - return module; -} - -/* ImportFrom */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { - PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); - if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Format(PyExc_ImportError, - #if PY_MAJOR_VERSION < 3 - "cannot import name %.230s", PyString_AS_STRING(name)); - #else - "cannot import name %S", name); - #endif - } - return value; -} - -/* PyErrFetchRestore */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -} -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -} -#endif - -/* CLineInTraceback */ -#ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; -#if CYTHON_COMPILING_IN_CPYTHON - PyObject **cython_runtime_dict; -#endif - if (unlikely(!__pyx_cython_runtime)) { - return c_line; - } - __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); -#if CYTHON_COMPILING_IN_CPYTHON - cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); - if (likely(cython_runtime_dict)) { - __PYX_PY_DICT_LOOKUP_IF_MODIFIED( - use_cline, *cython_runtime_dict, - __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) - } else -#endif - { - PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); - if (use_cline_obj) { - use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; - Py_DECREF(use_cline_obj); - } else { - PyErr_Clear(); - use_cline = NULL; - } - } - if (!use_cline) { - c_line = 0; - PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; - } - __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); - return c_line; -} -#endif - -/* CodeObjectCache */ -static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { - int start = 0, mid = 0, end = count - 1; - if (end >= 0 && code_line > entries[end].code_line) { - return count; - } - while (start < end) { - mid = start + (end - start) / 2; - if (code_line < entries[mid].code_line) { - end = mid; - } else if (code_line > entries[mid].code_line) { - start = mid + 1; - } else { - return mid; - } - } - if (code_line <= entries[mid].code_line) { - return mid; - } else { - return mid + 1; - } -} -static PyCodeObject *__pyx_find_code_object(int code_line) { - PyCodeObject* code_object; - int pos; - if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { - return NULL; - } - pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); - if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { - return NULL; - } - code_object = __pyx_code_cache.entries[pos].code_object; - Py_INCREF(code_object); - return code_object; -} -static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - int pos, i; - __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; - if (unlikely(!code_line)) { - return; - } - if (unlikely(!entries)) { - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); - if (likely(entries)) { - __pyx_code_cache.entries = entries; - __pyx_code_cache.max_count = 64; - __pyx_code_cache.count = 1; - entries[0].code_line = code_line; - entries[0].code_object = code_object; - Py_INCREF(code_object); - } - return; - } - pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); - if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { - PyCodeObject* tmp = entries[pos].code_object; - entries[pos].code_object = code_object; - Py_DECREF(tmp); - return; - } - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } - __pyx_code_cache.entries = entries; - __pyx_code_cache.max_count = new_max; - } - for (i=__pyx_code_cache.count; i>pos; i--) { - entries[i] = entries[i-1]; - } - entries[pos].code_line = code_line; - entries[pos].code_object = code_object; - __pyx_code_cache.count++; - Py_INCREF(code_object); -} - -/* AddTraceback */ -#include "compile.h" -#include "frameobject.h" -#include "traceback.h" -static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = 0; - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - #if PY_MAJOR_VERSION < 3 - py_srcfile = PyString_FromString(filename); - #else - py_srcfile = PyUnicode_FromString(filename); - #endif - if (!py_srcfile) goto bad; - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - #else - py_funcname = PyUnicode_FromString(funcname); - #endif - } - if (!py_funcname) goto bad; - py_code = __Pyx_PyCode_New( - 0, - 0, - 0, - 0, - 0, - __pyx_empty_bytes, /*PyObject *code,*/ - __pyx_empty_tuple, /*PyObject *consts,*/ - __pyx_empty_tuple, /*PyObject *names,*/ - __pyx_empty_tuple, /*PyObject *varnames,*/ - __pyx_empty_tuple, /*PyObject *freevars,*/ - __pyx_empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - py_line, - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); - Py_DECREF(py_funcname); - return py_code; -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - return NULL; -} -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = 0; - PyFrameObject *py_frame = 0; - PyThreadState *tstate = __Pyx_PyThreadState_Current; - if (c_line) { - c_line = __Pyx_CLineForTraceback(tstate, c_line); - } - py_code = __pyx_find_code_object(c_line ? -c_line : py_line); - if (!py_code) { - py_code = __Pyx_CreateCodeObjectForTraceback( - funcname, c_line, py_line, filename); - if (!py_code) goto bad; - __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); - } - py_frame = PyFrame_New( - tstate, /*PyThreadState *tstate,*/ - py_code, /*PyCodeObject *code,*/ - __pyx_d, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (!py_frame) goto bad; - __Pyx_PyFrame_SetLineNumber(py_frame, py_line); - PyTraceBack_Here(py_frame); -bad: - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - -/* CIntFromPyVerify */ -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ - {\ - func_type value = func_value;\ - if (sizeof(target_type) < sizeof(func_type)) {\ - if (unlikely(value != (func_type) (target_type) value)) {\ - func_type zero = 0;\ - if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ - return (target_type) -1;\ - if (is_unsigned && unlikely(value < zero))\ - goto raise_neg_overflow;\ - else\ - goto raise_overflow;\ - }\ - }\ - return (target_type) value;\ - } - -/* CIntFromPy */ -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof(long) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (long) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (long) 0; - case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (long) 0; - case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: - if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } -#endif - if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return (long) -1; - } - } else { - long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to long"); - return (long) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; -} - -/* CIntFromPy */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof(int) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (int) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (int) 0; - case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { - return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { - return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { - return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if (sizeof(int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (int) 0; - case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: - if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: - if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: - if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } -#endif - if (sizeof(int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return (int) -1; - } - } else { - int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); - return (int) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; -} - -/* FastTypeChecks */ -#if CYTHON_COMPILING_IN_CPYTHON -static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { - while (a) { - a = a->tp_base; - if (a == b) - return 1; - } - return b == &PyBaseObject_Type; -} -static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { - PyObject *mro; - if (a == b) return 1; - mro = a->tp_mro; - if (likely(mro)) { - Py_ssize_t i, n; - n = PyTuple_GET_SIZE(mro); - for (i = 0; i < n; i++) { - if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) - return 1; - } - return 0; - } - return __Pyx_InBases(a, b); -} -#if PY_MAJOR_VERSION == 2 -static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { - PyObject *exception, *value, *tb; - int res; - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ErrFetch(&exception, &value, &tb); - res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; - if (unlikely(res == -1)) { - PyErr_WriteUnraisable(err); - res = 0; - } - if (!res) { - res = PyObject_IsSubclass(err, exc_type2); - if (unlikely(res == -1)) { - PyErr_WriteUnraisable(err); - res = 0; - } - } - __Pyx_ErrRestore(exception, value, tb); - return res; -} -#else -static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { - int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; - if (!res) { - res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); - } - return res; -} -#endif -static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { - Py_ssize_t i, n; - assert(PyExceptionClass_Check(exc_type)); - n = PyTuple_GET_SIZE(tuple); -#if PY_MAJOR_VERSION >= 3 - for (i=0; ip) { - #if PY_MAJOR_VERSION < 3 - if (t->is_unicode) { - *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); - } else if (t->intern) { - *t->p = PyString_InternFromString(t->s); - } else { - *t->p = PyString_FromStringAndSize(t->s, t->n - 1); - } - #else - if (t->is_unicode | t->is_str) { - if (t->intern) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->encoding) { - *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); - } else { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); - } - } else { - *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); - } - #endif - if (!*t->p) - return -1; - if (PyObject_Hash(*t->p) == -1) - return -1; - ++t; - } - return 0; -} - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { - return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); -} -static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { - Py_ssize_t ignore; - return __Pyx_PyObject_AsStringAndSize(o, &ignore); -} -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT -#if !CYTHON_PEP393_ENABLED -static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { - char* defenc_c; - PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); - if (!defenc) return NULL; - defenc_c = PyBytes_AS_STRING(defenc); -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - { - char* end = defenc_c + PyBytes_GET_SIZE(defenc); - char* c; - for (c = defenc_c; c < end; c++) { - if ((unsigned char) (*c) >= 128) { - PyUnicode_AsASCIIString(o); - return NULL; - } - } - } -#endif - *length = PyBytes_GET_SIZE(defenc); - return defenc_c; -} -#else -static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { - if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - if (likely(PyUnicode_IS_ASCII(o))) { - *length = PyUnicode_GET_LENGTH(o); - return PyUnicode_AsUTF8(o); - } else { - PyUnicode_AsASCIIString(o); - return NULL; - } -#else - return PyUnicode_AsUTF8AndSize(o, length); -#endif -} -#endif -#endif -static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT - if ( -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - __Pyx_sys_getdefaultencoding_not_ascii && -#endif - PyUnicode_Check(o)) { - return __Pyx_PyUnicode_AsStringAndSize(o, length); - } else -#endif -#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) - if (PyByteArray_Check(o)) { - *length = PyByteArray_GET_SIZE(o); - return PyByteArray_AS_STRING(o); - } else -#endif - { - char* result; - int r = PyBytes_AsStringAndSize(o, &result, length); - if (unlikely(r < 0)) { - return NULL; - } else { - return result; - } - } -} -static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { - int is_true = x == Py_True; - if (is_true | (x == Py_False) | (x == Py_None)) return is_true; - else return PyObject_IsTrue(x); -} -static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { - int retval; - if (unlikely(!x)) return -1; - retval = __Pyx_PyObject_IsTrue(x); - Py_DECREF(x); - return retval; -} -static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { -#if PY_MAJOR_VERSION >= 3 - if (PyLong_Check(result)) { - if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, - "__int__ returned non-int (type %.200s). " - "The ability to return an instance of a strict subclass of int " - "is deprecated, and may be removed in a future version of Python.", - Py_TYPE(result)->tp_name)) { - Py_DECREF(result); - return NULL; - } - return result; - } -#endif - PyErr_Format(PyExc_TypeError, - "__%.4s__ returned non-%.4s (type %.200s)", - type_name, type_name, Py_TYPE(result)->tp_name); - Py_DECREF(result); - return NULL; -} -static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { -#if CYTHON_USE_TYPE_SLOTS - PyNumberMethods *m; -#endif - const char *name = NULL; - PyObject *res = NULL; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x) || PyLong_Check(x))) -#else - if (likely(PyLong_Check(x))) -#endif - return __Pyx_NewRef(x); -#if CYTHON_USE_TYPE_SLOTS - m = Py_TYPE(x)->tp_as_number; - #if PY_MAJOR_VERSION < 3 - if (m && m->nb_int) { - name = "int"; - res = m->nb_int(x); - } - else if (m && m->nb_long) { - name = "long"; - res = m->nb_long(x); - } - #else - if (likely(m && m->nb_int)) { - name = "int"; - res = m->nb_int(x); - } - #endif -#else - if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { - res = PyNumber_Int(x); - } -#endif - if (likely(res)) { -#if PY_MAJOR_VERSION < 3 - if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { -#else - if (unlikely(!PyLong_CheckExact(res))) { -#endif - return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); - } - } - else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_TypeError, - "an integer is required"); - } - return res; -} -static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_ssize_t ival; - PyObject *x; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(b))) { - if (sizeof(Py_ssize_t) >= sizeof(long)) - return PyInt_AS_LONG(b); - else - return PyInt_AsSsize_t(b); - } -#endif - if (likely(PyLong_CheckExact(b))) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)b)->ob_digit; - const Py_ssize_t size = Py_SIZE(b); - if (likely(__Pyx_sst_abs(size) <= 1)) { - ival = likely(size) ? digits[0] : 0; - if (size == -1) ival = -ival; - return ival; - } else { - switch (size) { - case 2: - if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { - return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case -2: - if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { - return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case 3: - if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { - return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case -3: - if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { - return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case 4: - if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { - return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case -4: - if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { - return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - } - } - #endif - return PyLong_AsSsize_t(b); - } - x = PyNumber_Index(b); - if (!x) return -1; - ival = PyInt_AsSsize_t(x); - Py_DECREF(x); - return ival; -} -static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); -} -static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { - return PyInt_FromSize_t(ival); -} - - -#endif /* Py_PYTHON_H */ diff --git a/ssh/helper.pyx b/ssh/helper.pyx deleted file mode 100644 index 49f45a1c..00000000 --- a/ssh/helper.pyx +++ /dev/null @@ -1,37 +0,0 @@ -# This file is part of ssh-python. -# Copyright (C) 2018 Panos Kittenis -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation, version 2.1. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -from select import select - -from session cimport Session - -from c_ssh cimport SSH_READ_PENDING, SSH_WRITE_PENDING, ssh_get_poll_flags - - -def wait_socket(_socket not None, Session session, timeout=1): - """Helper function for testing non-blocking mode. - - This function blocks the calling thread for seconds - - to be used only for testing purposes. - """ - cdef int directions = ssh_get_poll_flags(session._session) - if directions == 0: - return 0 - readfds = (_socket,) \ - if (directions & SSH_READ_PENDING) else () - writefds = (_socket,) \ - if (directions & SSH_WRITE_PENDING) else () - return select(readfds, writefds, (), timeout) diff --git a/ssh/keytypes.c b/ssh/keytypes.c index 6feb1ba1..1c76f315 100644 --- a/ssh/keytypes.c +++ b/ssh/keytypes.c @@ -9100,7 +9100,7 @@ if (!__Pyx_RefNanny) { /* "ssh/keytypes.pyx":1 * # This file is part of ssh-python. # <<<<<<<<<<<<<< - * # Copyright (C) 2018 Panos Kittenis + * # Copyright (C) 2018-2020 Panos Kittenis * # */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) diff --git a/ssh/keytypes.pyx b/ssh/keytypes.pyx index 7583ac0f..5d6a59b5 100644 --- a/ssh/keytypes.pyx +++ b/ssh/keytypes.pyx @@ -1,5 +1,5 @@ # This file is part of ssh-python. -# Copyright (C) 2018 Panos Kittenis +# Copyright (C) 2018-2020 Panos Kittenis # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/ssh/utils.c b/ssh/utils.c index 488fa012..9445e225 100644 --- a/ssh/utils.c +++ b/ssh/utils.c @@ -1093,9 +1093,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif -/* PyIntCompare.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); - /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); @@ -1134,15 +1131,15 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); -/* CIntFromPy.proto */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) @@ -1883,13 +1880,13 @@ static PyObject *__pyx_f_3ssh_5utils_ssh_string_to_bytes(ssh_string __pyx_v__str * * * def wait_socket(session not None, sock not None, timeout=None): # <<<<<<<<<<<<<< - * directions = session.get_poll_flags() - * if directions == 0: + * """Helper function for testing non-blocking mode. + * */ /* Python wrapper */ static PyObject *__pyx_pw_3ssh_5utils_1wait_socket(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_3ssh_5utils_wait_socket[] = "wait_socket(session, sock, timeout=None)"; +static char __pyx_doc_3ssh_5utils_wait_socket[] = "wait_socket(session, sock, timeout=None)\nHelper function for testing non-blocking mode.\n\n This function blocks the calling thread for seconds -\n to be used only for testing purposes.\n "; static PyMethodDef __pyx_mdef_3ssh_5utils_1wait_socket = {"wait_socket", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ssh_5utils_1wait_socket, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ssh_5utils_wait_socket}; static PyObject *__pyx_pw_3ssh_5utils_1wait_socket(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_session = 0; @@ -1979,7 +1976,7 @@ static PyObject *__pyx_pw_3ssh_5utils_1wait_socket(PyObject *__pyx_self, PyObjec } static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_session, PyObject *__pyx_v_sock, PyObject *__pyx_v_timeout) { - PyObject *__pyx_v_directions = NULL; + int __pyx_v_directions; PyObject *__pyx_v_readfds = NULL; PyObject *__pyx_v_writefds = NULL; PyObject *__pyx_r = NULL; @@ -1995,14 +1992,14 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wait_socket", 0); - /* "ssh/utils.pyx":74 - * - * def wait_socket(session not None, sock not None, timeout=None): - * directions = session.get_poll_flags() # <<<<<<<<<<<<<< + /* "ssh/utils.pyx":79 + * to be used only for testing purposes. + * """ + * cdef int directions = session.get_poll_flags() # <<<<<<<<<<<<<< * if directions == 0: * return 0 */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_n_s_get_poll_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_n_s_get_poll_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2016,27 +2013,25 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_directions = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_directions = __pyx_t_4; - /* "ssh/utils.pyx":75 - * def wait_socket(session not None, sock not None, timeout=None): - * directions = session.get_poll_flags() + /* "ssh/utils.pyx":80 + * """ + * cdef int directions = session.get_poll_flags() * if directions == 0: # <<<<<<<<<<<<<< * return 0 * readfds = (sock,) \ */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_directions, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { + __pyx_t_5 = ((__pyx_v_directions == 0) != 0); + if (__pyx_t_5) { - /* "ssh/utils.pyx":76 - * directions = session.get_poll_flags() + /* "ssh/utils.pyx":81 + * cdef int directions = session.get_poll_flags() * if directions == 0: * return 0 # <<<<<<<<<<<<<< * readfds = (sock,) \ @@ -2047,48 +2042,41 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ __pyx_r = __pyx_int_0; goto __pyx_L0; - /* "ssh/utils.pyx":75 - * def wait_socket(session not None, sock not None, timeout=None): - * directions = session.get_poll_flags() + /* "ssh/utils.pyx":80 + * """ + * cdef int directions = session.get_poll_flags() * if directions == 0: # <<<<<<<<<<<<<< * return 0 * readfds = (sock,) \ */ } - /* "ssh/utils.pyx":78 + /* "ssh/utils.pyx":83 * return 0 * readfds = (sock,) \ * if (directions & SSH_READ_PENDING) else () # <<<<<<<<<<<<<< * writefds = (sock,) \ * if (directions & SSH_WRITE_PENDING) else () */ - __pyx_t_2 = __Pyx_PyInt_From_int(SSH_READ_PENDING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_And(__pyx_v_directions, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { + if (((__pyx_v_directions & SSH_READ_PENDING) != 0)) { - /* "ssh/utils.pyx":77 + /* "ssh/utils.pyx":82 * if directions == 0: * return 0 * readfds = (sock,) \ # <<<<<<<<<<<<<< * if (directions & SSH_READ_PENDING) else () * writefds = (sock,) \ */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sock); __Pyx_GIVEREF(__pyx_v_sock); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sock); - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sock); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; } else { - /* "ssh/utils.pyx":78 + /* "ssh/utils.pyx":83 * return 0 * readfds = (sock,) \ * if (directions & SSH_READ_PENDING) else () # <<<<<<<<<<<<<< @@ -2101,30 +2089,23 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ __pyx_v_readfds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/utils.pyx":80 + /* "ssh/utils.pyx":85 * if (directions & SSH_READ_PENDING) else () * writefds = (sock,) \ * if (directions & SSH_WRITE_PENDING) else () # <<<<<<<<<<<<<< * select(readfds, writefds, (), timeout) * */ - __pyx_t_3 = __Pyx_PyInt_From_int(SSH_WRITE_PENDING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_And(__pyx_v_directions, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_4) { + if (((__pyx_v_directions & SSH_WRITE_PENDING) != 0)) { - /* "ssh/utils.pyx":79 + /* "ssh/utils.pyx":84 * readfds = (sock,) \ * if (directions & SSH_READ_PENDING) else () * writefds = (sock,) \ # <<<<<<<<<<<<<< * if (directions & SSH_WRITE_PENDING) else () * select(readfds, writefds, (), timeout) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sock); __Pyx_GIVEREF(__pyx_v_sock); @@ -2133,7 +2114,7 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2 = 0; } else { - /* "ssh/utils.pyx":80 + /* "ssh/utils.pyx":85 * if (directions & SSH_READ_PENDING) else () * writefds = (sock,) \ * if (directions & SSH_WRITE_PENDING) else () # <<<<<<<<<<<<<< @@ -2146,17 +2127,17 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ __pyx_v_writefds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/utils.pyx":81 + /* "ssh/utils.pyx":86 * writefds = (sock,) \ * if (directions & SSH_WRITE_PENDING) else () * select(readfds, writefds, (), timeout) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_select); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_select); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; - __pyx_t_5 = 0; + __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { @@ -2164,13 +2145,13 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_5 = 1; + __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_readfds, __pyx_v_writefds, __pyx_empty_tuple, __pyx_v_timeout}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -2178,30 +2159,30 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_readfds, __pyx_v_writefds, __pyx_empty_tuple, __pyx_v_timeout}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_readfds); __Pyx_GIVEREF(__pyx_v_readfds); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_readfds); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_v_readfds); __Pyx_INCREF(__pyx_v_writefds); __Pyx_GIVEREF(__pyx_v_writefds); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_writefds); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_writefds); __Pyx_INCREF(__pyx_empty_tuple); __Pyx_GIVEREF(__pyx_empty_tuple); - PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_empty_tuple); + PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_4, __pyx_empty_tuple); __Pyx_INCREF(__pyx_v_timeout); __Pyx_GIVEREF(__pyx_v_timeout); - PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_timeout); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_4, __pyx_v_timeout); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -2212,8 +2193,8 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ * * * def wait_socket(session not None, sock not None, timeout=None): # <<<<<<<<<<<<<< - * directions = session.get_poll_flags() - * if directions == 0: + * """Helper function for testing non-blocking mode. + * */ /* function exit code */ @@ -2227,7 +2208,6 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ __Pyx_AddTraceback("ssh.utils.wait_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_directions); __Pyx_XDECREF(__pyx_v_readfds); __Pyx_XDECREF(__pyx_v_writefds); __Pyx_XGIVEREF(__pyx_r); @@ -2235,7 +2215,7 @@ static PyObject *__pyx_pf_3ssh_5utils_wait_socket(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "ssh/utils.pyx":84 +/* "ssh/utils.pyx":89 * * * cdef int handle_error_codes( # <<<<<<<<<<<<<< @@ -2259,7 +2239,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_error_codes", 0); - /* "ssh/utils.pyx":86 + /* "ssh/utils.pyx":91 * cdef int handle_error_codes( * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: # <<<<<<<<<<<<<< @@ -2269,7 +2249,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi switch (__pyx_v_errcode) { case SSH_OK: - /* "ssh/utils.pyx":87 + /* "ssh/utils.pyx":92 * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: * return SSH_OK # <<<<<<<<<<<<<< @@ -2279,7 +2259,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi __pyx_r = SSH_OK; goto __pyx_L0; - /* "ssh/utils.pyx":86 + /* "ssh/utils.pyx":91 * cdef int handle_error_codes( * int errcode, ssh_session session) except -1: * if errcode == SSH_OK: # <<<<<<<<<<<<<< @@ -2289,18 +2269,18 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi break; case SSH_ERROR: - /* "ssh/utils.pyx":89 + /* "ssh/utils.pyx":94 * return SSH_OK * elif errcode == SSH_ERROR: * raise SSHError(errcode, ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == SSH_EOF: * raise EOF(ssh_get_error(session)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SSHError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_errcode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_errcode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -2317,7 +2297,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -2327,7 +2307,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -2335,7 +2315,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -2346,16 +2326,16 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 89, __pyx_L1_error) + __PYX_ERR(0, 94, __pyx_L1_error) - /* "ssh/utils.pyx":88 + /* "ssh/utils.pyx":93 * if errcode == SSH_OK: * return SSH_OK * elif errcode == SSH_ERROR: # <<<<<<<<<<<<<< @@ -2365,16 +2345,16 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi break; case SSH_EOF: - /* "ssh/utils.pyx":91 + /* "ssh/utils.pyx":96 * raise SSHError(errcode, ssh_get_error(session)) * elif errcode == SSH_EOF: * raise EOF(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == SSH_AGAIN: * return SSH_AGAIN */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EOF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EOF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2389,14 +2369,14 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 91, __pyx_L1_error) + __PYX_ERR(0, 96, __pyx_L1_error) - /* "ssh/utils.pyx":90 + /* "ssh/utils.pyx":95 * elif errcode == SSH_ERROR: * raise SSHError(errcode, ssh_get_error(session)) * elif errcode == SSH_EOF: # <<<<<<<<<<<<<< @@ -2406,7 +2386,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi break; case SSH_AGAIN: - /* "ssh/utils.pyx":93 + /* "ssh/utils.pyx":98 * raise EOF(ssh_get_error(session)) * elif errcode == SSH_AGAIN: * return SSH_AGAIN # <<<<<<<<<<<<<< @@ -2416,7 +2396,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi __pyx_r = SSH_AGAIN; goto __pyx_L0; - /* "ssh/utils.pyx":92 + /* "ssh/utils.pyx":97 * elif errcode == SSH_EOF: * raise EOF(ssh_get_error(session)) * elif errcode == SSH_AGAIN: # <<<<<<<<<<<<<< @@ -2426,7 +2406,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi break; default: - /* "ssh/utils.pyx":95 + /* "ssh/utils.pyx":100 * return SSH_AGAIN * else: * if errcode < 0: # <<<<<<<<<<<<<< @@ -2436,16 +2416,16 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi __pyx_t_8 = ((__pyx_v_errcode < 0) != 0); if (unlikely(__pyx_t_8)) { - /* "ssh/utils.pyx":96 + /* "ssh/utils.pyx":101 * else: * if errcode < 0: * raise OtherError(ssh_get_error(session)) # <<<<<<<<<<<<<< * return errcode * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OtherError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OtherError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2460,14 +2440,14 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 96, __pyx_L1_error) + __PYX_ERR(0, 101, __pyx_L1_error) - /* "ssh/utils.pyx":95 + /* "ssh/utils.pyx":100 * return SSH_AGAIN * else: * if errcode < 0: # <<<<<<<<<<<<<< @@ -2476,7 +2456,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi */ } - /* "ssh/utils.pyx":97 + /* "ssh/utils.pyx":102 * if errcode < 0: * raise OtherError(ssh_get_error(session)) * return errcode # <<<<<<<<<<<<<< @@ -2488,7 +2468,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi break; } - /* "ssh/utils.pyx":84 + /* "ssh/utils.pyx":89 * * * cdef int handle_error_codes( # <<<<<<<<<<<<<< @@ -2511,7 +2491,7 @@ static int __pyx_f_3ssh_5utils_handle_error_codes(int __pyx_v_errcode, ssh_sessi return __pyx_r; } -/* "ssh/utils.pyx":100 +/* "ssh/utils.pyx":105 * * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: # <<<<<<<<<<<<<< @@ -2532,7 +2512,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_auth_error_codes", 0); - /* "ssh/utils.pyx":101 + /* "ssh/utils.pyx":106 * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: # <<<<<<<<<<<<<< @@ -2542,7 +2522,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ switch (__pyx_v_errcode) { case SSH_AUTH_SUCCESS: - /* "ssh/utils.pyx":102 + /* "ssh/utils.pyx":107 * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: * return ssh_auth_e.SSH_AUTH_SUCCESS # <<<<<<<<<<<<<< @@ -2552,7 +2532,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_r = SSH_AUTH_SUCCESS; goto __pyx_L0; - /* "ssh/utils.pyx":101 + /* "ssh/utils.pyx":106 * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: # <<<<<<<<<<<<<< @@ -2562,16 +2542,16 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_DENIED: - /* "ssh/utils.pyx":104 + /* "ssh/utils.pyx":109 * return ssh_auth_e.SSH_AUTH_SUCCESS * elif errcode == ssh_auth_e.SSH_AUTH_DENIED: * raise AuthenticationDenied(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: * raise AuthenticationError(ssh_get_error(session)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2586,14 +2566,14 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 104, __pyx_L1_error) + __PYX_ERR(0, 109, __pyx_L1_error) - /* "ssh/utils.pyx":103 + /* "ssh/utils.pyx":108 * if errcode == ssh_auth_e.SSH_AUTH_SUCCESS: * return ssh_auth_e.SSH_AUTH_SUCCESS * elif errcode == ssh_auth_e.SSH_AUTH_DENIED: # <<<<<<<<<<<<<< @@ -2603,16 +2583,16 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_ERROR: - /* "ssh/utils.pyx":106 + /* "ssh/utils.pyx":111 * raise AuthenticationDenied(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: * raise AuthenticationError(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: * raise AuthenticationPartial(ssh_get_error(session)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2627,14 +2607,14 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 106, __pyx_L1_error) + __PYX_ERR(0, 111, __pyx_L1_error) - /* "ssh/utils.pyx":105 + /* "ssh/utils.pyx":110 * elif errcode == ssh_auth_e.SSH_AUTH_DENIED: * raise AuthenticationDenied(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: # <<<<<<<<<<<<<< @@ -2644,16 +2624,16 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_PARTIAL: - /* "ssh/utils.pyx":108 + /* "ssh/utils.pyx":113 * raise AuthenticationError(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: * raise AuthenticationPartial(ssh_get_error(session)) # <<<<<<<<<<<<<< * elif errcode == ssh_auth_e.SSH_AUTH_AGAIN: * return ssh_auth_e.SSH_AUTH_AGAIN */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationPartial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AuthenticationPartial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(ssh_get_error(__pyx_v_session)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2668,14 +2648,14 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 108, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) - /* "ssh/utils.pyx":107 + /* "ssh/utils.pyx":112 * elif errcode == ssh_auth_e.SSH_AUTH_ERROR: * raise AuthenticationError(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: # <<<<<<<<<<<<<< @@ -2685,7 +2665,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; case SSH_AUTH_AGAIN: - /* "ssh/utils.pyx":110 + /* "ssh/utils.pyx":115 * raise AuthenticationPartial(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_AGAIN: * return ssh_auth_e.SSH_AUTH_AGAIN # <<<<<<<<<<<<<< @@ -2695,7 +2675,7 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ __pyx_r = SSH_AUTH_AGAIN; goto __pyx_L0; - /* "ssh/utils.pyx":109 + /* "ssh/utils.pyx":114 * elif errcode == ssh_auth_e.SSH_AUTH_PARTIAL: * raise AuthenticationPartial(ssh_get_error(session)) * elif errcode == ssh_auth_e.SSH_AUTH_AGAIN: # <<<<<<<<<<<<<< @@ -2705,18 +2685,18 @@ static int __pyx_f_3ssh_5utils_handle_auth_error_codes(int __pyx_v_errcode, ssh_ break; default: - /* "ssh/utils.pyx":112 + /* "ssh/utils.pyx":117 * return ssh_auth_e.SSH_AUTH_AGAIN * else: * return handle_error_codes(errcode, session) # <<<<<<<<<<<<<< */ - __pyx_t_5 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_errcode, __pyx_v_session); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_errcode, __pyx_v_session); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 117, __pyx_L1_error) __pyx_r = __pyx_t_5; goto __pyx_L0; break; } - /* "ssh/utils.pyx":100 + /* "ssh/utils.pyx":105 * * * cdef int handle_auth_error_codes(int errcode, ssh_session session) except -1: # <<<<<<<<<<<<<< @@ -2828,8 +2808,8 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * * def wait_socket(session not None, sock not None, timeout=None): # <<<<<<<<<<<<<< - * directions = session.get_poll_flags() - * if directions == 0: + * """Helper function for testing non-blocking mode. + * */ __pyx_tuple_ = PyTuple_Pack(6, __pyx_n_s_session, __pyx_n_s_sock, __pyx_n_s_timeout, __pyx_n_s_directions, __pyx_n_s_readfds, __pyx_n_s_writefds); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); @@ -3219,8 +3199,8 @@ if (!__Pyx_RefNanny) { * * * def wait_socket(session not None, sock not None, timeout=None): # <<<<<<<<<<<<<< - * directions = session.get_poll_flags() - * if directions == 0: + * """Helper function for testing non-blocking mode. + * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3ssh_5utils_1wait_socket, NULL, __pyx_n_s_ssh_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -3973,73 +3953,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif -/* PyIntCompare */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { - if (op1 == op2) { - Py_RETURN_TRUE; - } - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(op1))) { - const long b = intval; - long a = PyInt_AS_LONG(op1); - if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; - } - #endif - #if CYTHON_USE_PYLONG_INTERNALS - if (likely(PyLong_CheckExact(op1))) { - int unequal; - unsigned long uintval; - Py_ssize_t size = Py_SIZE(op1); - const digit* digits = ((PyLongObject*)op1)->ob_digit; - if (intval == 0) { - if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; - } else if (intval < 0) { - if (size >= 0) - Py_RETURN_FALSE; - intval = -intval; - size = -size; - } else { - if (size <= 0) - Py_RETURN_FALSE; - } - uintval = (unsigned long) intval; -#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 - if (uintval >> (PyLong_SHIFT * 4)) { - unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) - | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); - } else -#endif -#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 - if (uintval >> (PyLong_SHIFT * 3)) { - unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) - | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); - } else -#endif -#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 - if (uintval >> (PyLong_SHIFT * 2)) { - unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) - | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); - } else -#endif -#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 - if (uintval >> (PyLong_SHIFT * 1)) { - unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) - | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); - } else -#endif - unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); - if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; - } - #endif - if (PyFloat_CheckExact(op1)) { - const long b = intval; - double a = PyFloat_AS_DOUBLE(op1); - if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; - } - return ( - PyObject_RichCompare(op1, op2, Py_EQ)); -} - /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, @@ -4485,6 +4398,28 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, Py_XDECREF(py_frame); } +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; @@ -4516,73 +4451,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { } } -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - -/* CIntFromPyVerify */ -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ - {\ - func_type value = func_value;\ - if (sizeof(target_type) < sizeof(func_type)) {\ - if (unlikely(value != (func_type) (target_type) value)) {\ - func_type zero = 0;\ - if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ - return (target_type) -1;\ - if (is_unsigned && unlikely(value < zero))\ - goto raise_neg_overflow;\ - else\ - goto raise_overflow;\ - }\ - }\ - return (target_type) value;\ - } - /* CIntFromPy */ -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(long) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } - return (long) val; + return (int) val; } } else #endif @@ -4591,32 +4473,32 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (long) 0; - case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; @@ -4630,86 +4512,86 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (long) -1; + return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (long) 0; - case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: - if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif - if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } @@ -4718,7 +4600,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else - long val; + int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { @@ -4738,40 +4620,71 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { return val; } #endif - return (long) -1; + return (int) -1; } } else { - long val; + int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, - "value too large to convert to long"); - return (long) -1; + "value too large to convert to int"); + return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } } /* CIntFromPy */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(int) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } - return (int) val; + return (long) val; } } else #endif @@ -4780,32 +4693,32 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (int) 0; - case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { - return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { - return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { - return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; @@ -4819,86 +4732,86 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (int) -1; + return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if (sizeof(int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (int) 0; - case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: - if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: - if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: - if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif - if (sizeof(int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } @@ -4907,7 +4820,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else - int val; + long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { @@ -4927,24 +4840,24 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { return val; } #endif - return (int) -1; + return (long) -1; } } else { - int val; + long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); - return (int) -1; + "value too large to convert to long"); + return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; + "can't convert negative value to long"); + return (long) -1; } /* FastTypeChecks */ diff --git a/ssh/utils.pyx b/ssh/utils.pyx index d707a3fd..a2e9f16c 100644 --- a/ssh/utils.pyx +++ b/ssh/utils.pyx @@ -71,7 +71,12 @@ cdef bytes ssh_string_to_bytes(ssh_string _str): def wait_socket(session not None, sock not None, timeout=None): - directions = session.get_poll_flags() + """Helper function for testing non-blocking mode. + + This function blocks the calling thread for seconds - + to be used only for testing purposes. + """ + cdef int directions = session.get_poll_flags() if directions == 0: return 0 readfds = (sock,) \ diff --git a/tests/base_test.py b/tests/base_case.py similarity index 100% rename from tests/base_test.py rename to tests/base_case.py diff --git a/tests/test_channel.py b/tests/test_channel.py index d5a85679..541f3e47 100644 --- a/tests/test_channel.py +++ b/tests/test_channel.py @@ -18,8 +18,6 @@ from pytest import mark from time import sleep -from .base_test import SSHTestCase - from ssh.key import SSHKey, import_pubkey_file, import_privkey_file from ssh import options from ssh.exceptions import KeyImportError @@ -27,6 +25,8 @@ from ssh.error_codes import SSH_AGAIN from ssh.exceptions import EOF, SSHError +from .base_case import SSHTestCase + class ChannelTest(SSHTestCase): diff --git a/tests/test_connector.py b/tests/test_connector.py index 7655296a..1d66c855 100644 --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -17,11 +17,11 @@ import unittest import socket -from .base_test import SSHTestCase - from ssh.connector import Connector, CONNECTOR_STDOUT, CONNECTOR_STDERR, \ CONNECTOR_BOTH +from .base_case import SSHTestCase + class ConnectorTest(SSHTestCase): diff --git a/tests/test_event.py b/tests/test_event.py index 46a00e67..55573739 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -17,8 +17,6 @@ import unittest import socket -from .base_test import SSHTestCase - from ssh.session import Session from ssh import options from ssh.event import Event @@ -27,6 +25,8 @@ CONNECTOR_BOTH from ssh.exceptions import SSHError +from .base_case import SSHTestCase + class CallbacksTest(SSHTestCase): diff --git a/tests/test_session.py b/tests/test_session.py index 80af435c..5ba5b99c 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -19,8 +19,6 @@ import os from select import select -from .base_test import SSHTestCase - from ssh.session import Session, SSH_AUTH_AGAIN, SSH_READ_PENDING, SSH_WRITE_PENDING from ssh.channel import Channel from ssh.key import SSHKey, import_pubkey_file, import_privkey_file @@ -31,6 +29,8 @@ from ssh.error_codes import SSH_AGAIN from ssh.utils import wait_socket +from .base_case import SSHTestCase + class SessionTest(SSHTestCase): diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 8447d34d..684ac66b 100644 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -34,7 +34,7 @@ from ssh.helper import wait_socket -from .base_test import SSHTestCase +from .base_case import SSHTestCase class SFTPTest(SSHTestCase): From 3b3257b01a90229857b4bb83d733d4c80df44055 Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:04:17 +0100 Subject: [PATCH 05/11] Updated doc index --- doc/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index c009fa6d..6eb60ade 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -33,3 +33,5 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` + +.. _libssh: https://www.libssh.org From cd9402be06a1aaf30d59d49a2288f826bce1e5c8 Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:06:01 +0100 Subject: [PATCH 06/11] Updated tests --- tests/test_sftp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 684ac66b..13ca9452 100644 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -31,7 +31,7 @@ from ssh.sftp_attributes import SFTPAttributes from ssh.exceptions import InvalidAPIUse, SFTPHandleError, SFTPError from ssh.error_codes import SSH_AGAIN -from ssh.helper import wait_socket +from ssh.utils import wait_socket from .base_case import SSHTestCase From 8a3c4ba4ed9953567d127f15fc9bf03687a7952b Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:08:10 +0100 Subject: [PATCH 07/11] Updated CI cfgs --- .circleci/config.yml | 3 +++ .travis.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 105067e2..1bc17b28 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,9 @@ jobs: flake8 ssh python setup.py sdist cd dist; pip install *; cd .. + cd doc + make html + cd .. name: Test osx: diff --git a/.travis.yml b/.travis.yml index 857a03e8..a0eda1d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,9 @@ script: - flake8 ssh - python setup.py sdist - cd dist; pip install *; cd .. + - cd doc + - make html + - cd .. jobs: include: - stage: build wheels From 759058d240105ee4b580ff4d3981ecee41948e89 Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:11:05 +0100 Subject: [PATCH 08/11] Updated readme --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index dca38abe..f507a96f 100644 --- a/README.rst +++ b/README.rst @@ -17,6 +17,9 @@ Bindings for libssh_ C library. :target: https://pypi.python.org/pypi/ssh-python .. image:: https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true :target: https://ci.appveyor.com/project/pkittenis/ssh-python +.. image:: https://readthedocs.org/projects/ssh-python/badge/?version=latest + :target: http://ssh-python.readthedocs.org/en/latest/ + :alt: Latest documentation Installation From 88be5faf9791bb6ef7c955dc1c53af595059578d Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:11:52 +0100 Subject: [PATCH 09/11] Updated docs --- doc/index.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index 6eb60ade..66f5f190 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -17,6 +17,9 @@ Bindings for libssh_ C library. :target: https://pypi.python.org/pypi/ssh-python .. image:: https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true :target: https://ci.appveyor.com/project/pkittenis/ssh-python +.. image:: https://readthedocs.org/projects/ssh-python/badge/?version=latest + :target: http://ssh-python.readthedocs.org/en/latest/ + :alt: Latest documentation .. toctree:: From a18102c781a65b2280fa88a07a8285aa80f27b8f Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:31:47 +0100 Subject: [PATCH 10/11] Re-enabled session disconnect. Updated changelog, readme. --- Changelog.rst | 19 + README.rst | 20 +- doc/Changelog.rst | 1 + doc/index.rst | 1 + ssh/session.c | 1490 ++++++++++++++++++++++++--------------------- ssh/session.pyx | 14 +- 6 files changed, 821 insertions(+), 724 deletions(-) create mode 120000 doc/Changelog.rst diff --git a/Changelog.rst b/Changelog.rst index 1e15011f..aea4c4b2 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -1,6 +1,25 @@ Change Log ============= + +0.5.0 ++++++ + +Changes +-------- + +* Updated exception handling to match libssh API - `ssh.exceptions.SSHError` raised on all non-specific errors. +* Updated authentication exception handling to raise specific authentication errors. +* Added `Session.disconnect` implementation. +* Channel object initialisation now requires Session object to be passed in. + + +Fixes +------ + +* Channel deallocation would crash on double free when session channel open failed. + + 0.4.0 +++++++ diff --git a/README.rst b/README.rst index f507a96f..d7cba342 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,9 @@ Bindings for libssh_ C library. Installation _____________ -Binary wheels are provided for Linux, OSX and Windows wheels to follow. +Binary wheels are provided for Linux (manylinux 2010), OSX (10.14 and 10.15 for brew Python), and Windows 64-bit (Python 3.6/3.7/3.8). + +Wheels have *no dependencies*. For building from source, see `documentation `_. .. code-block:: shell @@ -33,17 +35,7 @@ Binary wheels are provided for Linux, OSX and Windows wheels to follow. pip install ssh-python -Project is beta status. - - -Prerequisites --------------- - -* OpenSSL *or* gcrypt library and development headers -* Optionally Zlib library and development headers for compression - -``Libssh`` source code is embedded in this project and will be built when installation is triggered per above instructions. -Versions of ``libssh`` other than the one embedded in this project are not supported. +Project is beta status, please report any issues. Quick Start @@ -93,10 +85,14 @@ _________ The library uses `Cython`_ based native code extensions as wrappers to ``libssh``. * Thread safe - GIL released as much as possible + + * libssh threading limitations apply - anything not supported in C is not supported in Python * Very low overhead thin wrapper * Object oriented + * Memory freed automatically and safely as objects are garbage collected by Python * Uses Python semantics where applicable + * channel/file handle context manager support * channel/file handle iterator support * Raises low level C errors as Python exceptions diff --git a/doc/Changelog.rst b/doc/Changelog.rst new file mode 120000 index 00000000..bd5ae163 --- /dev/null +++ b/doc/Changelog.rst @@ -0,0 +1 @@ +../Changelog.rst \ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index 66f5f190..0448321d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -28,6 +28,7 @@ Bindings for libssh_ C library. installation api + Changelog Indices and tables diff --git a/ssh/session.c b/ssh/session.c index 40258720..bab9f091 100644 --- a/ssh/session.c +++ b/ssh/session.c @@ -1661,7 +1661,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self, int __pyx_v_timeout, int __pyx_v_dest_port); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self, PyObject *__pyx_v_address, int __pyx_v_port); /* proto */ @@ -3094,13 +3094,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh * return handle_error_codes(rc, self._session) * * def disconnect(self): # <<<<<<<<<<<<<< - * """No-op. Handled by object de-allocation.""" - * # Due to bug in libssh that segfaults if session + * """Disconnect session and close socket""" + * if not c_ssh.ssh_is_connected(self._session): */ /* Python wrapper */ static PyObject *__pyx_pw_3ssh_7session_7Session_17disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_3ssh_7session_7Session_16disconnect[] = "Session.disconnect(self)\nNo-op. Handled by object de-allocation."; +static char __pyx_doc_3ssh_7session_7Session_16disconnect[] = "Session.disconnect(self)\nDisconnect session and close socket"; static PyObject *__pyx_pw_3ssh_7session_7Session_17disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -3112,20 +3112,104 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_17disconnect(PyObject *__pyx_v_ return __pyx_r; } -static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED struct __pyx_obj_3ssh_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_t_1; __Pyx_RefNannySetupContext("disconnect", 0); + /* "ssh/session.pyx":145 + * def disconnect(self): + * """Disconnect session and close socket""" + * if not c_ssh.ssh_is_connected(self._session): # <<<<<<<<<<<<<< + * return + * with nogil: + */ + __pyx_t_1 = ((!(ssh_is_connected(__pyx_v_self->_session) != 0)) != 0); + if (__pyx_t_1) { + + /* "ssh/session.pyx":146 + * """Disconnect session and close socket""" + * if not c_ssh.ssh_is_connected(self._session): + * return # <<<<<<<<<<<<<< + * with nogil: + * c_ssh.ssh_disconnect(self._session) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "ssh/session.pyx":145 + * def disconnect(self): + * """Disconnect session and close socket""" + * if not c_ssh.ssh_is_connected(self._session): # <<<<<<<<<<<<<< + * return + * with nogil: + */ + } + + /* "ssh/session.pyx":147 + * if not c_ssh.ssh_is_connected(self._session): + * return + * with nogil: # <<<<<<<<<<<<<< + * c_ssh.ssh_disconnect(self._session) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "ssh/session.pyx":148 + * return + * with nogil: + * c_ssh.ssh_disconnect(self._session) # <<<<<<<<<<<<<< + * + * def connector_new(self): + */ + ssh_disconnect(__pyx_v_self->_session); + } + + /* "ssh/session.pyx":147 + * if not c_ssh.ssh_is_connected(self._session): + * return + * with nogil: # <<<<<<<<<<<<<< + * c_ssh.ssh_disconnect(self._session) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "ssh/session.pyx":143 + * return handle_error_codes(rc, self._session) + * + * def disconnect(self): # <<<<<<<<<<<<<< + * """Disconnect session and close socket""" + * if not c_ssh.ssh_is_connected(self._session): + */ + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "ssh/session.pyx":154 - * # c_ssh.ssh_disconnect(self._session) +/* "ssh/session.pyx":150 + * c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< * cdef c_ssh.ssh_connector _connector @@ -3157,7 +3241,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":152 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3172,7 +3256,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":157 + /* "ssh/session.pyx":153 * cdef c_ssh.ssh_connector _connector * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) # <<<<<<<<<<<<<< @@ -3182,7 +3266,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":152 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3201,7 +3285,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob } } - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":154 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3211,7 +3295,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":155 * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: * return # <<<<<<<<<<<<<< @@ -3222,7 +3306,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":154 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3231,7 +3315,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob */ } - /* "ssh/session.pyx":160 + /* "ssh/session.pyx":156 * if _connector is NULL: * return * return Connector.from_ptr(_connector, self) # <<<<<<<<<<<<<< @@ -3239,14 +3323,14 @@ 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, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":154 - * # c_ssh.ssh_disconnect(self._session) + /* "ssh/session.pyx":150 + * c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< * cdef c_ssh.ssh_connector _connector @@ -3264,7 +3348,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":162 +/* "ssh/session.pyx":158 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3307,11 +3391,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, 158, __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, 158, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3319,12 +3403,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, 158, __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, 158, __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, 158, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.accept_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3348,7 +3432,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":160 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3363,16 +3447,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":165 + /* "ssh/session.pyx":161 * 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, 161, __pyx_L4_error) - /* "ssh/session.pyx":166 + /* "ssh/session.pyx":162 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_accept_forward( # <<<<<<<<<<<<<< @@ -3382,7 +3466,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":160 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3408,7 +3492,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o } } - /* "ssh/session.pyx":168 + /* "ssh/session.pyx":164 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3418,7 +3502,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":165 * self._session, timeout, &dest_port) * if _channel is NULL: * return # <<<<<<<<<<<<<< @@ -3429,7 +3513,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":164 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3438,7 +3522,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o */ } - /* "ssh/session.pyx":170 + /* "ssh/session.pyx":166 * if _channel is NULL: * return * return Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< @@ -3446,13 +3530,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, 166, __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":158 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3471,7 +3555,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":172 +/* "ssh/session.pyx":168 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3514,11 +3598,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, 168, __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, 168, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3527,18 +3611,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, 168, __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, 168, __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, 168, __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); @@ -3565,19 +3649,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":169 * * 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, 169, __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":170 * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3586,12 +3670,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, 170, __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, 170, __pyx_L1_error) __pyx_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":176 + /* "ssh/session.pyx":172 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3606,7 +3690,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":177 + /* "ssh/session.pyx":173 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_cancel_forward( # <<<<<<<<<<<<<< @@ -3616,7 +3700,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":172 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3635,7 +3719,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o } } - /* "ssh/session.pyx":179 + /* "ssh/session.pyx":175 * rc = c_ssh.ssh_channel_cancel_forward( * self._session, c_address, port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3643,14 +3727,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, 175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __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":168 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3670,7 +3754,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":181 +/* "ssh/session.pyx":177 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3716,17 +3800,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, 177, __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, 177, __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, 177, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3736,19 +3820,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, 177, __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, 177, __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, 177, __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, 177, __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); @@ -3775,19 +3859,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":178 * * 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, 178, __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":179 * 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 # <<<<<<<<<<<<<< @@ -3796,12 +3880,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, 179, __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, 179, __pyx_L1_error) __pyx_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":185 + /* "ssh/session.pyx":181 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3816,7 +3900,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":186 + /* "ssh/session.pyx":182 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_listen_forward( # <<<<<<<<<<<<<< @@ -3826,7 +3910,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":181 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3845,7 +3929,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o } } - /* "ssh/session.pyx":188 + /* "ssh/session.pyx":184 * rc = c_ssh.ssh_channel_listen_forward( * self._session, c_address, port, &bound_port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3853,14 +3937,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, 184, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __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":177 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3880,7 +3964,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":190 +/* "ssh/session.pyx":186 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -3914,7 +3998,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":189 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -3929,16 +4013,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct #endif /*try:*/ { - /* "ssh/session.pyx":194 + /* "ssh/session.pyx":190 * 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, 190, __pyx_L4_error) - /* "ssh/session.pyx":195 + /* "ssh/session.pyx":191 * with nogil: * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) # <<<<<<<<<<<<<< @@ -3948,7 +4032,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":189 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -3974,19 +4058,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct } } - /* "ssh/session.pyx":196 + /* "ssh/session.pyx":192 * _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, 192, __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":193 * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message * return b_message # <<<<<<<<<<<<<< @@ -3998,7 +4082,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":186 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -4018,7 +4102,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct return __pyx_r; } -/* "ssh/session.pyx":199 +/* "ssh/session.pyx":195 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4050,7 +4134,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":197 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4065,7 +4149,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/session.pyx":202 + /* "ssh/session.pyx":198 * cdef c_ssh.socket_t _sock * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) # <<<<<<<<<<<<<< @@ -4075,7 +4159,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":197 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4094,7 +4178,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ } } - /* "ssh/session.pyx":203 + /* "ssh/session.pyx":199 * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) * return _sock # <<<<<<<<<<<<<< @@ -4102,13 +4186,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, 199, __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":195 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4127,7 +4211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/session.pyx":205 +/* "ssh/session.pyx":201 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4161,7 +4245,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":204 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4176,16 +4260,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":209 + /* "ssh/session.pyx":205 * 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, 205, __pyx_L4_error) - /* "ssh/session.pyx":210 + /* "ssh/session.pyx":206 * with nogil: * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) # <<<<<<<<<<<<<< @@ -4195,7 +4279,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":204 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4221,19 +4305,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx } } - /* "ssh/session.pyx":211 + /* "ssh/session.pyx":207 * _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, 207, __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":208 * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -4245,7 +4329,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":201 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4265,7 +4349,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":214 +/* "ssh/session.pyx":210 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4298,7 +4382,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":212 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4313,16 +4397,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ #endif /*try:*/ { - /* "ssh/session.pyx":217 + /* "ssh/session.pyx":213 * 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, 213, __pyx_L4_error) - /* "ssh/session.pyx":218 + /* "ssh/session.pyx":214 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) # <<<<<<<<<<<<<< @@ -4332,7 +4416,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":212 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4358,7 +4442,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ } } - /* "ssh/session.pyx":219 + /* "ssh/session.pyx":215 * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4366,13 +4450,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, 215, __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":210 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4391,7 +4475,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ return __pyx_r; } -/* "ssh/session.pyx":221 +/* "ssh/session.pyx":217 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4421,7 +4505,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":218 * * def get_server_publickey(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -4429,9 +4513,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, 218, __pyx_L1_error) - /* "ssh/session.pyx":221 + /* "ssh/session.pyx":217 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4448,7 +4532,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U return __pyx_r; } -/* "ssh/session.pyx":224 +/* "ssh/session.pyx":220 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4480,7 +4564,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":222 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4495,7 +4579,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":227 + /* "ssh/session.pyx":223 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_version(self._session) # <<<<<<<<<<<<<< @@ -4505,7 +4589,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":222 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4524,7 +4608,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ } } - /* "ssh/session.pyx":228 + /* "ssh/session.pyx":224 * with nogil: * rc = c_ssh.ssh_get_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4532,13 +4616,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, 224, __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":220 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4557,7 +4641,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":230 +/* "ssh/session.pyx":226 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4589,7 +4673,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":228 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4604,7 +4688,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":233 + /* "ssh/session.pyx":229 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_status(self._session) # <<<<<<<<<<<<<< @@ -4614,7 +4698,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":228 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4633,7 +4717,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 } } - /* "ssh/session.pyx":234 + /* "ssh/session.pyx":230 * with nogil: * rc = c_ssh.ssh_get_status(self._session) * return rc # <<<<<<<<<<<<<< @@ -4641,13 +4725,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, 230, __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":226 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4666,7 +4750,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":236 +/* "ssh/session.pyx":232 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4698,7 +4782,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":234 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4713,7 +4797,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":239 + /* "ssh/session.pyx":235 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) # <<<<<<<<<<<<<< @@ -4723,7 +4807,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":234 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4742,7 +4826,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o } } - /* "ssh/session.pyx":240 + /* "ssh/session.pyx":236 * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) * return rc # <<<<<<<<<<<<<< @@ -4750,13 +4834,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, 236, __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":232 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4775,7 +4859,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":242 +/* "ssh/session.pyx":238 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4808,7 +4892,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":240 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4823,7 +4907,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":245 + /* "ssh/session.pyx":241 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) # <<<<<<<<<<<<<< @@ -4833,7 +4917,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":240 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4852,7 +4936,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ } } - /* "ssh/session.pyx":246 + /* "ssh/session.pyx":242 * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4861,13 +4945,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, 242, __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":238 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4886,7 +4970,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":248 +/* "ssh/session.pyx":244 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -4919,7 +5003,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":246 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4934,7 +5018,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":251 + /* "ssh/session.pyx":247 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_connected(self._session) # <<<<<<<<<<<<<< @@ -4944,7 +5028,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":246 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4963,7 +5047,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj } } - /* "ssh/session.pyx":252 + /* "ssh/session.pyx":248 * with nogil: * rc = c_ssh.ssh_is_connected(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4972,13 +5056,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, 248, __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":244 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -4997,7 +5081,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":254 +/* "ssh/session.pyx":250 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5030,7 +5114,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":252 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5045,7 +5129,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":257 + /* "ssh/session.pyx":253 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) # <<<<<<<<<<<<<< @@ -5055,7 +5139,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":252 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5074,7 +5158,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ } } - /* "ssh/session.pyx":258 + /* "ssh/session.pyx":254 * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5083,13 +5167,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, 254, __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":250 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5108,7 +5192,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":260 +/* "ssh/session.pyx":256 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5126,7 +5210,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, 256, __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 */ @@ -5149,7 +5233,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":258 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5164,7 +5248,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":263 + /* "ssh/session.pyx":259 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) # <<<<<<<<<<<<<< @@ -5174,7 +5258,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":258 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5193,7 +5277,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj } } - /* "ssh/session.pyx":264 + /* "ssh/session.pyx":260 * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5201,14 +5285,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, 260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __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":256 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5227,7 +5311,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":266 +/* "ssh/session.pyx":262 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5257,7 +5341,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":263 * * def options_getopt(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -5265,9 +5349,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, 263, __pyx_L1_error) - /* "ssh/session.pyx":266 + /* "ssh/session.pyx":262 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5284,7 +5368,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED return __pyx_r; } -/* "ssh/session.pyx":269 +/* "ssh/session.pyx":265 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5320,19 +5404,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":266 * * 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, 266, __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":267 * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) * cdef char *c_filepath = b_filepath # <<<<<<<<<<<<<< @@ -5341,12 +5425,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, 267, __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, 267, __pyx_L1_error) __pyx_v_c_filepath = __pyx_t_2; - /* "ssh/session.pyx":273 + /* "ssh/session.pyx":269 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5361,7 +5445,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ #endif /*try:*/ { - /* "ssh/session.pyx":274 + /* "ssh/session.pyx":270 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) # <<<<<<<<<<<<<< @@ -5371,7 +5455,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":269 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5390,7 +5474,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ } } - /* "ssh/session.pyx":275 + /* "ssh/session.pyx":271 * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5398,14 +5482,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, 271, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __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":265 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5425,7 +5509,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ return __pyx_r; } -/* "ssh/session.pyx":277 +/* "ssh/session.pyx":273 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5445,7 +5529,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, 273, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5471,7 +5555,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":275 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5486,7 +5570,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":280 + /* "ssh/session.pyx":276 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_set( # <<<<<<<<<<<<<< @@ -5496,7 +5580,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":275 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5515,7 +5599,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx } } - /* "ssh/session.pyx":282 + /* "ssh/session.pyx":278 * rc = c_ssh.ssh_options_set( * self._session, c_ssh.ssh_options_e.SSH_OPTIONS_PORT, &port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5523,14 +5607,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx * 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, 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, 278, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __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":273 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5549,7 +5633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":284 +/* "ssh/session.pyx":280 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5592,11 +5676,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_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, 284, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 280, __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, 284, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 280, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5609,13 +5693,13 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_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, 284, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 280, __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, 284, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 280, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_56options_set(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_option, __pyx_v_value); /* function exit code */ @@ -5641,19 +5725,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set", 0); - /* "ssh/session.pyx":293 + /* "ssh/session.pyx":289 * :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, 293, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":296 + /* "ssh/session.pyx":292 * cdef char *c_value * cdef int rc * c_value = b_value # <<<<<<<<<<<<<< @@ -5662,12 +5746,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 296, __pyx_L1_error) + __PYX_ERR(0, 292, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/session.pyx":297 + /* "ssh/session.pyx":293 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5682,7 +5766,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":298 + /* "ssh/session.pyx":294 * c_value = b_value * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) # <<<<<<<<<<<<<< @@ -5692,7 +5776,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_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":297 + /* "ssh/session.pyx":293 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5711,7 +5795,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ } } - /* "ssh/session.pyx":299 + /* "ssh/session.pyx":295 * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5719,14 +5803,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_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, 299, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __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, 295, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":284 + /* "ssh/session.pyx":280 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5746,7 +5830,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":301 +/* "ssh/session.pyx":297 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5764,7 +5848,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_59options_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, 301, __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_get(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7options_Option *)__pyx_v_option)); /* function exit code */ @@ -5791,7 +5875,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get", 0); - /* "ssh/session.pyx":306 + /* "ssh/session.pyx":302 * """ * cdef char *_value * cdef char **value = NULL # <<<<<<<<<<<<<< @@ -5800,7 +5884,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v_value = NULL; - /* "ssh/session.pyx":309 + /* "ssh/session.pyx":305 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5815,7 +5899,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":310 + /* "ssh/session.pyx":306 * cdef bytes b_value * with nogil: * rc = c_ssh.ssh_options_get( # <<<<<<<<<<<<<< @@ -5825,7 +5909,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_v_rc = ssh_options_get(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_value); } - /* "ssh/session.pyx":309 + /* "ssh/session.pyx":305 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5844,7 +5928,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ } } - /* "ssh/session.pyx":312 + /* "ssh/session.pyx":308 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5854,20 +5938,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_rc < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/session.pyx":313 + /* "ssh/session.pyx":309 * 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, 313, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __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, 313, __pyx_L1_error) + __PYX_ERR(0, 309, __pyx_L1_error) - /* "ssh/session.pyx":312 + /* "ssh/session.pyx":308 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5876,7 +5960,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ } - /* "ssh/session.pyx":314 + /* "ssh/session.pyx":310 * if rc < 0: * raise OptionError * _value = value[0] # <<<<<<<<<<<<<< @@ -5885,19 +5969,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v__value = (__pyx_v_value[0]); - /* "ssh/session.pyx":315 + /* "ssh/session.pyx":311 * 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, 315, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_value = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":316 + /* "ssh/session.pyx":312 * _value = value[0] * b_value = _value * c_ssh.ssh_string_free_char(_value) # <<<<<<<<<<<<<< @@ -5906,7 +5990,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ ssh_string_free_char(__pyx_v__value); - /* "ssh/session.pyx":317 + /* "ssh/session.pyx":313 * b_value = _value * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) # <<<<<<<<<<<<<< @@ -5914,14 +5998,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_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, 317, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":301 + /* "ssh/session.pyx":297 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5941,7 +6025,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":319 +/* "ssh/session.pyx":315 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -5961,7 +6045,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_61options_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, 319, __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, 315, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5987,7 +6071,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get_port", 0); - /* "ssh/session.pyx":321 + /* "ssh/session.pyx":317 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6002,7 +6086,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":322 + /* "ssh/session.pyx":318 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) # <<<<<<<<<<<<<< @@ -6012,7 +6096,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx __pyx_v_rc = ssh_options_get_port(__pyx_v_self->_session, (&__pyx_v_port_target)); } - /* "ssh/session.pyx":321 + /* "ssh/session.pyx":317 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6031,7 +6115,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx } } - /* "ssh/session.pyx":323 + /* "ssh/session.pyx":319 * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6039,14 +6123,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_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, 323, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __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, 319, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":319 + /* "ssh/session.pyx":315 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6065,7 +6149,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":325 +/* "ssh/session.pyx":321 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6083,7 +6167,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_63send_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, 325, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 321, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_62send_ignore(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6108,7 +6192,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_ignore", 0); - /* "ssh/session.pyx":326 + /* "ssh/session.pyx":322 * * def send_ignore(self, bytes data): * cdef char *c_data = data # <<<<<<<<<<<<<< @@ -6117,12 +6201,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 326, __pyx_L1_error) + __PYX_ERR(0, 322, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L1_error) __pyx_v_c_data = __pyx_t_1; - /* "ssh/session.pyx":328 + /* "ssh/session.pyx":324 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6137,7 +6221,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":329 + /* "ssh/session.pyx":325 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) # <<<<<<<<<<<<<< @@ -6147,7 +6231,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ __pyx_v_rc = ssh_send_ignore(__pyx_v_self->_session, __pyx_v_c_data); } - /* "ssh/session.pyx":328 + /* "ssh/session.pyx":324 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6166,7 +6250,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ } } - /* "ssh/session.pyx":330 + /* "ssh/session.pyx":326 * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6174,14 +6258,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_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, 330, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __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, 326, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":325 + /* "ssh/session.pyx":321 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6200,7 +6284,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":332 +/* "ssh/session.pyx":328 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6243,11 +6327,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_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, 332, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 328, __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, 332, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 328, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6256,17 +6340,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_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, 332, __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, 328, __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, 332, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 328, __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, 332, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 328, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_64send_debug(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_message, __pyx_v_always_display); /* function exit code */ @@ -6291,7 +6375,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_debug", 0); - /* "ssh/session.pyx":333 + /* "ssh/session.pyx":329 * * def send_debug(self, bytes message, int always_display): * cdef char *c_message = message # <<<<<<<<<<<<<< @@ -6300,12 +6384,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 */ if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 333, __pyx_L1_error) + __PYX_ERR(0, 329, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) __pyx_v_c_message = __pyx_t_1; - /* "ssh/session.pyx":335 + /* "ssh/session.pyx":331 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6320,7 +6404,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":336 + /* "ssh/session.pyx":332 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_debug( # <<<<<<<<<<<<<< @@ -6330,7 +6414,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_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":335 + /* "ssh/session.pyx":331 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6349,7 +6433,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 } } - /* "ssh/session.pyx":338 + /* "ssh/session.pyx":334 * rc = c_ssh.ssh_send_debug( * self._session, c_message, always_display) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6357,14 +6441,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 * def gssapi_set_creds(self, creds): */ __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, 338, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __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, 334, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":332 + /* "ssh/session.pyx":328 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6383,7 +6467,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":340 +/* "ssh/session.pyx":336 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6413,7 +6497,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gssapi_set_creds", 0); - /* "ssh/session.pyx":341 + /* "ssh/session.pyx":337 * * def gssapi_set_creds(self, creds): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6421,9 +6505,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE * def service_request(self, bytes service): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 341, __pyx_L1_error) + __PYX_ERR(0, 337, __pyx_L1_error) - /* "ssh/session.pyx":340 + /* "ssh/session.pyx":336 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6440,7 +6524,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE return __pyx_r; } -/* "ssh/session.pyx":343 +/* "ssh/session.pyx":339 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6458,7 +6542,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_69service_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, 343, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 339, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_68service_request(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_service)); /* function exit code */ @@ -6483,7 +6567,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("service_request", 0); - /* "ssh/session.pyx":345 + /* "ssh/session.pyx":341 * def service_request(self, bytes service): * cdef int rc * cdef char *c_service = service # <<<<<<<<<<<<<< @@ -6492,12 +6576,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ */ if (unlikely(__pyx_v_service == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 345, __pyx_L1_error) + __PYX_ERR(0, 341, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L1_error) __pyx_v_c_service = __pyx_t_1; - /* "ssh/session.pyx":346 + /* "ssh/session.pyx":342 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6512,7 +6596,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":347 + /* "ssh/session.pyx":343 * cdef char *c_service = service * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) # <<<<<<<<<<<<<< @@ -6522,7 +6606,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ __pyx_v_rc = ssh_service_request(__pyx_v_self->_session, __pyx_v_c_service); } - /* "ssh/session.pyx":346 + /* "ssh/session.pyx":342 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6541,7 +6625,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ } } - /* "ssh/session.pyx":348 + /* "ssh/session.pyx":344 * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6549,14 +6633,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_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, 348, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __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, 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_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":343 + /* "ssh/session.pyx":339 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6575,7 +6659,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":352 +/* "ssh/session.pyx":348 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6593,7 +6677,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_71set_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, 352, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 348, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_70set_agent_channel(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_channel)); /* function exit code */ @@ -6616,7 +6700,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_channel", 0); - /* "ssh/session.pyx":354 + /* "ssh/session.pyx":350 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6631,7 +6715,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":355 + /* "ssh/session.pyx":351 * cdef int rc * with nogil: * rc = c_ssh.ssh_set_agent_channel( # <<<<<<<<<<<<<< @@ -6641,7 +6725,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py __pyx_v_rc = ssh_set_agent_channel(__pyx_v_self->_session, __pyx_v_channel->_channel); } - /* "ssh/session.pyx":354 + /* "ssh/session.pyx":350 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6660,7 +6744,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py } } - /* "ssh/session.pyx":357 + /* "ssh/session.pyx":353 * rc = c_ssh.ssh_set_agent_channel( * self._session, channel._channel) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6668,14 +6752,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_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, 357, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __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, 353, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":352 + /* "ssh/session.pyx":348 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6694,7 +6778,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py return __pyx_r; } -/* "ssh/session.pyx":359 +/* "ssh/session.pyx":355 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6713,7 +6797,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_73set_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, 359, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 355, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_72set_agent_socket(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_socket)); @@ -6738,17 +6822,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_socket", 0); - /* "ssh/session.pyx":361 + /* "ssh/session.pyx":357 * 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, 361, __pyx_L1_error) + __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 357, __pyx_L1_error) __pyx_v__sock = __pyx_t_1; - /* "ssh/session.pyx":362 + /* "ssh/session.pyx":358 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6763,7 +6847,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":363 + /* "ssh/session.pyx":359 * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) # <<<<<<<<<<<<<< @@ -6773,7 +6857,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx __pyx_v_rc = ssh_set_agent_socket(__pyx_v_self->_session, __pyx_v__sock); } - /* "ssh/session.pyx":362 + /* "ssh/session.pyx":358 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6792,7 +6876,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx } } - /* "ssh/session.pyx":364 + /* "ssh/session.pyx":360 * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6800,14 +6884,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_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, 364, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __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, 360, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":359 + /* "ssh/session.pyx":355 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6826,7 +6910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":366 +/* "ssh/session.pyx":362 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6846,7 +6930,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_75set_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, 366, __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, 362, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6866,7 +6950,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/session.pyx":367 + /* "ssh/session.pyx":363 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6881,7 +6965,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":368 + /* "ssh/session.pyx":364 * def set_blocking(self, int blocking): * with nogil: * c_ssh.ssh_set_blocking(self._session, blocking) # <<<<<<<<<<<<<< @@ -6891,7 +6975,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj ssh_set_blocking(__pyx_v_self->_session, __pyx_v_blocking); } - /* "ssh/session.pyx":367 + /* "ssh/session.pyx":363 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6910,7 +6994,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj } } - /* "ssh/session.pyx":366 + /* "ssh/session.pyx":362 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6925,7 +7009,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":370 +/* "ssh/session.pyx":366 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -6968,11 +7052,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_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, 370, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 366, __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, 370, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 366, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6985,7 +7069,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_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, 370, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 366, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.set_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7006,7 +7090,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counters", 0); - /* "ssh/session.pyx":371 + /* "ssh/session.pyx":367 * * def set_counters(self, scounter, rcounter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -7014,9 +7098,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st * def set_fd_except(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 371, __pyx_L1_error) + __PYX_ERR(0, 367, __pyx_L1_error) - /* "ssh/session.pyx":370 + /* "ssh/session.pyx":366 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7033,7 +7117,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st return __pyx_r; } -/* "ssh/session.pyx":373 +/* "ssh/session.pyx":369 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7060,7 +7144,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_except", 0); - /* "ssh/session.pyx":374 + /* "ssh/session.pyx":370 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7075,7 +7159,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":375 + /* "ssh/session.pyx":371 * def set_fd_except(self): * with nogil: * c_ssh.ssh_set_fd_except(self._session) # <<<<<<<<<<<<<< @@ -7085,7 +7169,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob ssh_set_fd_except(__pyx_v_self->_session); } - /* "ssh/session.pyx":374 + /* "ssh/session.pyx":370 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7104,7 +7188,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob } } - /* "ssh/session.pyx":373 + /* "ssh/session.pyx":369 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7119,7 +7203,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":377 +/* "ssh/session.pyx":373 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7146,7 +7230,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_toread", 0); - /* "ssh/session.pyx":378 + /* "ssh/session.pyx":374 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7161,7 +7245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":379 + /* "ssh/session.pyx":375 * def set_fd_toread(self): * with nogil: * c_ssh.ssh_set_fd_toread(self._session) # <<<<<<<<<<<<<< @@ -7171,7 +7255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob ssh_set_fd_toread(__pyx_v_self->_session); } - /* "ssh/session.pyx":378 + /* "ssh/session.pyx":374 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7190,7 +7274,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob } } - /* "ssh/session.pyx":377 + /* "ssh/session.pyx":373 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7205,7 +7289,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":381 +/* "ssh/session.pyx":377 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7232,7 +7316,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_towrite", 0); - /* "ssh/session.pyx":382 + /* "ssh/session.pyx":378 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7247,7 +7331,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":383 + /* "ssh/session.pyx":379 * def set_fd_towrite(self): * with nogil: * c_ssh.ssh_set_fd_towrite(self._session) # <<<<<<<<<<<<<< @@ -7257,7 +7341,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o ssh_set_fd_towrite(__pyx_v_self->_session); } - /* "ssh/session.pyx":382 + /* "ssh/session.pyx":378 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7276,7 +7360,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o } } - /* "ssh/session.pyx":381 + /* "ssh/session.pyx":377 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7291,7 +7375,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":385 +/* "ssh/session.pyx":381 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7318,7 +7402,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("silent_disconnect", 0); - /* "ssh/session.pyx":386 + /* "ssh/session.pyx":382 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7333,7 +7417,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":383 * def silent_disconnect(self): * with nogil: * c_ssh.ssh_silent_disconnect(self._session) # <<<<<<<<<<<<<< @@ -7343,7 +7427,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py ssh_silent_disconnect(__pyx_v_self->_session); } - /* "ssh/session.pyx":386 + /* "ssh/session.pyx":382 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7362,7 +7446,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py } } - /* "ssh/session.pyx":385 + /* "ssh/session.pyx":381 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7377,7 +7461,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py return __pyx_r; } -/* "ssh/session.pyx":389 +/* "ssh/session.pyx":385 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7411,7 +7495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_none", 0); - /* "ssh/session.pyx":391 + /* "ssh/session.pyx":387 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7426,16 +7510,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":392 + /* "ssh/session.pyx":388 * 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, 392, __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, 388, __pyx_L4_error) - /* "ssh/session.pyx":393 + /* "ssh/session.pyx":389 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) # <<<<<<<<<<<<<< @@ -7445,7 +7529,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob __pyx_v_rc = ssh_userauth_none(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":391 + /* "ssh/session.pyx":387 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7471,7 +7555,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob } } - /* "ssh/session.pyx":394 + /* "ssh/session.pyx":390 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7479,14 +7563,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_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, 394, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __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, 390, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":389 + /* "ssh/session.pyx":385 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7505,7 +7589,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":396 +/* "ssh/session.pyx":392 * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7539,7 +7623,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_list", 0); - /* "ssh/session.pyx":398 + /* "ssh/session.pyx":394 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7554,16 +7638,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":399 + /* "ssh/session.pyx":395 * 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, 399, __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, 395, __pyx_L4_error) - /* "ssh/session.pyx":400 + /* "ssh/session.pyx":396 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) # <<<<<<<<<<<<<< @@ -7573,7 +7657,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob __pyx_v_rc = ssh_userauth_list(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":398 + /* "ssh/session.pyx":394 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7599,7 +7683,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob } } - /* "ssh/session.pyx":401 + /* "ssh/session.pyx":397 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7607,14 +7691,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_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, 401, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __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, 397, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":396 + /* "ssh/session.pyx":392 * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7633,7 +7717,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":403 +/* "ssh/session.pyx":399 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7651,7 +7735,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_91userauth_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, 403, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 399, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_pubkey)); /* function exit code */ @@ -7675,7 +7759,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_try_publickey", 0); - /* "ssh/session.pyx":405 + /* "ssh/session.pyx":401 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7690,16 +7774,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct #endif /*try:*/ { - /* "ssh/session.pyx":406 + /* "ssh/session.pyx":402 * 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, 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, 402, __pyx_L4_error) - /* "ssh/session.pyx":407 + /* "ssh/session.pyx":403 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_try_publickey( # <<<<<<<<<<<<<< @@ -7709,7 +7793,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct __pyx_v_rc = ssh_userauth_try_publickey(__pyx_v_self->_session, NULL, __pyx_v_pubkey->_key); } - /* "ssh/session.pyx":405 + /* "ssh/session.pyx":401 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7735,7 +7819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct } } - /* "ssh/session.pyx":409 + /* "ssh/session.pyx":405 * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7743,14 +7827,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_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, 409, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __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, 405, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __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":399 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7769,7 +7853,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct return __pyx_r; } -/* "ssh/session.pyx":411 +/* "ssh/session.pyx":407 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7787,7 +7871,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_93userauth_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, 411, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 407, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_92userauth_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_privkey)); /* function exit code */ @@ -7811,7 +7895,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey", 0); - /* "ssh/session.pyx":413 + /* "ssh/session.pyx":409 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7826,16 +7910,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p #endif /*try:*/ { - /* "ssh/session.pyx":414 + /* "ssh/session.pyx":410 * 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, 414, __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, 410, __pyx_L4_error) - /* "ssh/session.pyx":415 + /* "ssh/session.pyx":411 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey( # <<<<<<<<<<<<<< @@ -7845,7 +7929,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p __pyx_v_rc = ssh_userauth_publickey(__pyx_v_self->_session, NULL, __pyx_v_privkey->_key); } - /* "ssh/session.pyx":413 + /* "ssh/session.pyx":409 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7871,7 +7955,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p } } - /* "ssh/session.pyx":417 + /* "ssh/session.pyx":413 * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7879,14 +7963,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_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, 417, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __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, 413, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":411 + /* "ssh/session.pyx":407 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7905,7 +7989,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p return __pyx_r; } -/* "ssh/session.pyx":421 +/* "ssh/session.pyx":417 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -7924,7 +8008,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_95userauth_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, 421, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 417, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_94userauth_agent(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_username)); @@ -7952,19 +8036,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_agent", 0); - /* "ssh/session.pyx":422 + /* "ssh/session.pyx":418 * 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, 422, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":423 + /* "ssh/session.pyx":419 * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -7973,12 +8057,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 423, __pyx_L1_error) + __PYX_ERR(0, 419, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":425 + /* "ssh/session.pyx":421 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7993,16 +8077,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":426 + /* "ssh/session.pyx":422 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_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, 426, __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, 422, __pyx_L4_error) - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":423 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) # <<<<<<<<<<<<<< @@ -8012,7 +8096,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o __pyx_v_rc = ssh_userauth_agent(__pyx_v_self->_session, __pyx_v_c_username); } - /* "ssh/session.pyx":425 + /* "ssh/session.pyx":421 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8038,7 +8122,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o } } - /* "ssh/session.pyx":428 + /* "ssh/session.pyx":424 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8046,14 +8130,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o * def userauth_publickey_auto(self, passphrase not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":421 + /* "ssh/session.pyx":417 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8073,7 +8157,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":430 +/* "ssh/session.pyx":426 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8092,7 +8176,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_97userauth_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, 430, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 426, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_passphrase)); @@ -8120,19 +8204,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_auto", 0); - /* "ssh/session.pyx":431 + /* "ssh/session.pyx":427 * * 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, 431, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":432 + /* "ssh/session.pyx":428 * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *c_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -8141,12 +8225,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 432, __pyx_L1_error) + __PYX_ERR(0, 428, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error) __pyx_v_c_passphrase = __pyx_t_2; - /* "ssh/session.pyx":434 + /* "ssh/session.pyx":430 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8161,16 +8245,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc #endif /*try:*/ { - /* "ssh/session.pyx":435 + /* "ssh/session.pyx":431 * 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, 435, __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, 431, __pyx_L4_error) - /* "ssh/session.pyx":436 + /* "ssh/session.pyx":432 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey_auto( # <<<<<<<<<<<<<< @@ -8180,7 +8264,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc __pyx_v_rc = ssh_userauth_publickey_auto(__pyx_v_self->_session, NULL, __pyx_v_c_passphrase); } - /* "ssh/session.pyx":434 + /* "ssh/session.pyx":430 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8206,7 +8290,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc } } - /* "ssh/session.pyx":438 + /* "ssh/session.pyx":434 * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8214,14 +8298,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_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, 438, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __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, 434, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":430 + /* "ssh/session.pyx":426 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8241,7 +8325,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc return __pyx_r; } -/* "ssh/session.pyx":440 +/* "ssh/session.pyx":436 * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8284,11 +8368,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_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, 440, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 436, __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, 440, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 436, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8301,17 +8385,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_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, 440, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 436, __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, 440, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 436, __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, 440, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 436, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_98userauth_password(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); @@ -8341,31 +8425,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_password", 0); - /* "ssh/session.pyx":441 + /* "ssh/session.pyx":437 * * 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, 441, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":442 + /* "ssh/session.pyx":438 * 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, 442, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_password = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":443 + /* "ssh/session.pyx":439 * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8374,12 +8458,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 443, __pyx_L1_error) + __PYX_ERR(0, 439, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":444 + /* "ssh/session.pyx":440 * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username * cdef char *c_password = b_password # <<<<<<<<<<<<<< @@ -8388,12 +8472,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_password == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 444, __pyx_L1_error) + __PYX_ERR(0, 440, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error) __pyx_v_c_password = __pyx_t_2; - /* "ssh/session.pyx":446 + /* "ssh/session.pyx":442 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8408,16 +8492,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":447 + /* "ssh/session.pyx":443 * 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, 447, __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, 443, __pyx_L4_error) - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":444 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_password( # <<<<<<<<<<<<<< @@ -8427,7 +8511,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py __pyx_v_rc = ssh_userauth_password(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_password); } - /* "ssh/session.pyx":446 + /* "ssh/session.pyx":442 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8453,7 +8537,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py } } - /* "ssh/session.pyx":450 + /* "ssh/session.pyx":446 * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8461,14 +8545,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py * 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, 450, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __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, 446, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":440 + /* "ssh/session.pyx":436 * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8489,7 +8573,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py return __pyx_r; } -/* "ssh/session.pyx":452 +/* "ssh/session.pyx":448 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8532,11 +8616,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_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, 452, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 448, __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, 452, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 448, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8549,17 +8633,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_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, 452, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 448, __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, 452, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 448, __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, 452, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 448, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_100userauth_kbdint(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_submethods); @@ -8589,31 +8673,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint", 0); - /* "ssh/session.pyx":453 + /* "ssh/session.pyx":449 * * 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, 453, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":454 + /* "ssh/session.pyx":450 * 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, 454, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_submethods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":455 + /* "ssh/session.pyx":451 * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8622,12 +8706,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 455, __pyx_L1_error) + __PYX_ERR(0, 451, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":456 + /* "ssh/session.pyx":452 * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods # <<<<<<<<<<<<<< @@ -8636,12 +8720,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_submethods == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 456, __pyx_L1_error) + __PYX_ERR(0, 452, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L1_error) __pyx_v_c_submethods = __pyx_t_2; - /* "ssh/session.pyx":458 + /* "ssh/session.pyx":454 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8656,16 +8740,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":459 + /* "ssh/session.pyx":455 * 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, 459, __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, 455, __pyx_L4_error) - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":456 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint( # <<<<<<<<<<<<<< @@ -8675,7 +8759,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx __pyx_v_rc = ssh_userauth_kbdint(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_submethods); } - /* "ssh/session.pyx":458 + /* "ssh/session.pyx":454 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8701,7 +8785,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx } } - /* "ssh/session.pyx":462 + /* "ssh/session.pyx":458 * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8709,14 +8793,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_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, 462, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __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, 458, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":452 + /* "ssh/session.pyx":448 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8737,7 +8821,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":464 +/* "ssh/session.pyx":460 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8771,7 +8855,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getinstruction", 0); - /* "ssh/session.pyx":467 + /* "ssh/session.pyx":463 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8786,16 +8870,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi #endif /*try:*/ { - /* "ssh/session.pyx":468 + /* "ssh/session.pyx":464 * 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, 468, __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, 464, __pyx_L4_error) - /* "ssh/session.pyx":469 + /* "ssh/session.pyx":465 * with nogil: * _check_connected(self._session) * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( # <<<<<<<<<<<<<< @@ -8805,7 +8889,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_v__instruction = ssh_userauth_kbdint_getinstruction(__pyx_v_self->_session); } - /* "ssh/session.pyx":467 + /* "ssh/session.pyx":463 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8831,20 +8915,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi } } - /* "ssh/session.pyx":471 + /* "ssh/session.pyx":467 * _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, 471, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __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, 471, __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, 467, __pyx_L1_error) __pyx_v_b_instruction = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":472 + /* "ssh/session.pyx":468 * self._session) * b_instruction = to_str(_instruction) * return b_instruction # <<<<<<<<<<<<<< @@ -8856,7 +8940,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_r = __pyx_v_b_instruction; goto __pyx_L0; - /* "ssh/session.pyx":464 + /* "ssh/session.pyx":460 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8876,7 +8960,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi return __pyx_r; } -/* "ssh/session.pyx":474 +/* "ssh/session.pyx":470 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -8910,7 +8994,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getname", 0); - /* "ssh/session.pyx":477 + /* "ssh/session.pyx":473 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -8925,16 +9009,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru #endif /*try:*/ { - /* "ssh/session.pyx":478 + /* "ssh/session.pyx":474 * 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, 478, __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, 474, __pyx_L4_error) - /* "ssh/session.pyx":479 + /* "ssh/session.pyx":475 * with nogil: * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) # <<<<<<<<<<<<<< @@ -8944,7 +9028,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_v__name = ssh_userauth_kbdint_getname(__pyx_v_self->_session); } - /* "ssh/session.pyx":477 + /* "ssh/session.pyx":473 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -8970,20 +9054,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru } } - /* "ssh/session.pyx":480 + /* "ssh/session.pyx":476 * _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, 480, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __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, 480, __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, 476, __pyx_L1_error) __pyx_v_b_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":477 * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) * return b_name # <<<<<<<<<<<<<< @@ -8995,7 +9079,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_r = __pyx_v_b_name; goto __pyx_L0; - /* "ssh/session.pyx":474 + /* "ssh/session.pyx":470 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -9015,7 +9099,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru return __pyx_r; } -/* "ssh/session.pyx":483 +/* "ssh/session.pyx":479 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9048,7 +9132,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnprompts", 0); - /* "ssh/session.pyx":485 + /* "ssh/session.pyx":481 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9063,16 +9147,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( #endif /*try:*/ { - /* "ssh/session.pyx":486 + /* "ssh/session.pyx":482 * 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, 486, __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, 482, __pyx_L4_error) - /* "ssh/session.pyx":487 + /* "ssh/session.pyx":483 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) # <<<<<<<<<<<<<< @@ -9082,7 +9166,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( __pyx_v_rc = ssh_userauth_kbdint_getnprompts(__pyx_v_self->_session); } - /* "ssh/session.pyx":485 + /* "ssh/session.pyx":481 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9108,7 +9192,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( } } - /* "ssh/session.pyx":488 + /* "ssh/session.pyx":484 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc # <<<<<<<<<<<<<< @@ -9116,13 +9200,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_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, 488, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":483 + /* "ssh/session.pyx":479 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9141,7 +9225,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( return __pyx_r; } -/* "ssh/session.pyx":490 +/* "ssh/session.pyx":486 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9184,11 +9268,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_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, 490, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 486, __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, 490, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 486, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9196,18 +9280,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_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, 490, __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, 486, __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, 490, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 486, __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, 490, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 486, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_echo); /* function exit code */ @@ -9233,17 +9317,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getprompt", 0); - /* "ssh/session.pyx":493 + /* "ssh/session.pyx":489 * 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, 493, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 489, __pyx_L1_error) __pyx_v_c_echo = __pyx_t_1; - /* "ssh/session.pyx":494 + /* "ssh/session.pyx":490 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9258,16 +9342,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st #endif /*try:*/ { - /* "ssh/session.pyx":495 + /* "ssh/session.pyx":491 * 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, 495, __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, 491, __pyx_L4_error) - /* "ssh/session.pyx":496 + /* "ssh/session.pyx":492 * with nogil: * _check_connected(self._session) * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( # <<<<<<<<<<<<<< @@ -9277,7 +9361,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_v__prompt = ssh_userauth_kbdint_getprompt(__pyx_v_self->_session, __pyx_v_i, __pyx_v_c_echo); } - /* "ssh/session.pyx":494 + /* "ssh/session.pyx":490 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9303,19 +9387,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st } } - /* "ssh/session.pyx":498 + /* "ssh/session.pyx":494 * _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, 498, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_b_prompt = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":499 + /* "ssh/session.pyx":495 * self._session, i, c_echo) * b_prompt = _prompt * return b_prompt # <<<<<<<<<<<<<< @@ -9327,7 +9411,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_r = __pyx_v_b_prompt; goto __pyx_L0; - /* "ssh/session.pyx":490 + /* "ssh/session.pyx":486 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9347,7 +9431,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st return __pyx_r; } -/* "ssh/session.pyx":501 +/* "ssh/session.pyx":497 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9380,7 +9464,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnanswers", 0); - /* "ssh/session.pyx":503 + /* "ssh/session.pyx":499 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9395,16 +9479,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( #endif /*try:*/ { - /* "ssh/session.pyx":504 + /* "ssh/session.pyx":500 * 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, 504, __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, 500, __pyx_L4_error) - /* "ssh/session.pyx":505 + /* "ssh/session.pyx":501 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) # <<<<<<<<<<<<<< @@ -9414,7 +9498,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( __pyx_v_rc = ssh_userauth_kbdint_getnanswers(__pyx_v_self->_session); } - /* "ssh/session.pyx":503 + /* "ssh/session.pyx":499 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9440,7 +9524,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( } } - /* "ssh/session.pyx":506 + /* "ssh/session.pyx":502 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc # <<<<<<<<<<<<<< @@ -9448,13 +9532,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_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, 506, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":501 + /* "ssh/session.pyx":497 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9473,7 +9557,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( return __pyx_r; } -/* "ssh/session.pyx":508 +/* "ssh/session.pyx":504 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9493,7 +9577,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_113userauth_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, 508, __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, 504, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9520,7 +9604,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getanswer", 0); - /* "ssh/session.pyx":511 + /* "ssh/session.pyx":507 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9535,16 +9619,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":512 + /* "ssh/session.pyx":508 * 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, 512, __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, 508, __pyx_L4_error) - /* "ssh/session.pyx":513 + /* "ssh/session.pyx":509 * with nogil: * _check_connected(self._session) * _answer = c_ssh.ssh_userauth_kbdint_getanswer( # <<<<<<<<<<<<<< @@ -9554,7 +9638,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_v__answer = ssh_userauth_kbdint_getanswer(__pyx_v_self->_session, __pyx_v_i); } - /* "ssh/session.pyx":511 + /* "ssh/session.pyx":507 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9580,19 +9664,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st } } - /* "ssh/session.pyx":515 + /* "ssh/session.pyx":511 * _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, 515, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_answer = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":516 + /* "ssh/session.pyx":512 * self._session, i) * b_answer = _answer * return b_answer # <<<<<<<<<<<<<< @@ -9604,7 +9688,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_r = __pyx_v_b_answer; goto __pyx_L0; - /* "ssh/session.pyx":508 + /* "ssh/session.pyx":504 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9624,7 +9708,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st return __pyx_r; } -/* "ssh/session.pyx":518 +/* "ssh/session.pyx":514 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9667,11 +9751,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_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, 518, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 514, __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, 518, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 514, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9679,18 +9763,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_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, 518, __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, 514, __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, 518, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __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, 518, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 514, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_answer); /* function exit code */ @@ -9716,17 +9800,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_setanswer", 0); - /* "ssh/session.pyx":519 + /* "ssh/session.pyx":515 * * 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, 519, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L1_error) __pyx_v_c_answer = __pyx_t_1; - /* "ssh/session.pyx":521 + /* "ssh/session.pyx":517 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9741,16 +9825,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":522 + /* "ssh/session.pyx":518 * 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, 522, __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, 518, __pyx_L4_error) - /* "ssh/session.pyx":523 + /* "ssh/session.pyx":519 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_setanswer( # <<<<<<<<<<<<<< @@ -9760,7 +9844,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_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":521 + /* "ssh/session.pyx":517 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9786,7 +9870,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st } } - /* "ssh/session.pyx":525 + /* "ssh/session.pyx":521 * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9794,14 +9878,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st * def userauth_gssapi(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, 525, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __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, 521, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/session.pyx":518 + /* "ssh/session.pyx":514 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9820,7 +9904,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st return __pyx_r; } -/* "ssh/session.pyx":527 +/* "ssh/session.pyx":523 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9854,7 +9938,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_gssapi", 0); - /* "ssh/session.pyx":529 + /* "ssh/session.pyx":525 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9869,16 +9953,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":530 + /* "ssh/session.pyx":526 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_gssapi(self._session) * 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, 530, __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, 526, __pyx_L4_error) - /* "ssh/session.pyx":531 + /* "ssh/session.pyx":527 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) # <<<<<<<<<<<<<< @@ -9888,7 +9972,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx __pyx_v_rc = ssh_userauth_gssapi(__pyx_v_self->_session); } - /* "ssh/session.pyx":529 + /* "ssh/session.pyx":525 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9914,7 +9998,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx } } - /* "ssh/session.pyx":532 + /* "ssh/session.pyx":528 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9922,14 +10006,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx * def write_knownhost(self): */ __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, 532, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __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, 528, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":527 + /* "ssh/session.pyx":523 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9948,7 +10032,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":534 +/* "ssh/session.pyx":530 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -9981,7 +10065,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_knownhost", 0); - /* "ssh/session.pyx":536 + /* "ssh/session.pyx":532 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9996,7 +10080,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":537 + /* "ssh/session.pyx":533 * cdef int rc * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10006,7 +10090,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx __pyx_v_rc = ssh_write_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":536 + /* "ssh/session.pyx":532 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10025,7 +10109,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx } } - /* "ssh/session.pyx":538 + /* "ssh/session.pyx":534 * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10033,14 +10117,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_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, 538, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __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, 534, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":534 + /* "ssh/session.pyx":530 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10059,7 +10143,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":540 +/* "ssh/session.pyx":536 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10093,7 +10177,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_knownhost", 0); - /* "ssh/session.pyx":543 + /* "ssh/session.pyx":539 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10108,7 +10192,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":544 + /* "ssh/session.pyx":540 * cdef bytes b_known_host * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10118,7 +10202,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_v__known_host = ssh_dump_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":543 + /* "ssh/session.pyx":539 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10137,7 +10221,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ } } - /* "ssh/session.pyx":545 + /* "ssh/session.pyx":541 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10147,7 +10231,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_t_1 = ((__pyx_v__known_host == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":546 + /* "ssh/session.pyx":542 * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: * return # <<<<<<<<<<<<<< @@ -10158,7 +10242,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":545 + /* "ssh/session.pyx":541 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10167,19 +10251,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ */ } - /* "ssh/session.pyx":547 + /* "ssh/session.pyx":543 * 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, 547, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_known_host = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":548 + /* "ssh/session.pyx":544 * return * b_known_host = _known_host * return b_known_host # <<<<<<<<<<<<<< @@ -10191,7 +10275,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = __pyx_v_b_known_host; goto __pyx_L0; - /* "ssh/session.pyx":540 + /* "ssh/session.pyx":536 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10211,7 +10295,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":550 +/* "ssh/session.pyx":546 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10245,7 +10329,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_clientbanner", 0); - /* "ssh/session.pyx":553 + /* "ssh/session.pyx":549 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10260,7 +10344,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":554 + /* "ssh/session.pyx":550 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) # <<<<<<<<<<<<<< @@ -10270,7 +10354,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_v__banner = ssh_get_clientbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":553 + /* "ssh/session.pyx":549 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10289,7 +10373,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py } } - /* "ssh/session.pyx":555 + /* "ssh/session.pyx":551 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10299,7 +10383,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":556 + /* "ssh/session.pyx":552 * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10310,7 +10394,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":555 + /* "ssh/session.pyx":551 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10319,19 +10403,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py */ } - /* "ssh/session.pyx":557 + /* "ssh/session.pyx":553 * 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, 557, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":558 + /* "ssh/session.pyx":554 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10343,7 +10427,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":550 + /* "ssh/session.pyx":546 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10363,7 +10447,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":560 +/* "ssh/session.pyx":556 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10397,7 +10481,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_serverbanner", 0); - /* "ssh/session.pyx":563 + /* "ssh/session.pyx":559 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10412,7 +10496,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":564 + /* "ssh/session.pyx":560 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) # <<<<<<<<<<<<<< @@ -10422,7 +10506,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_v__banner = ssh_get_serverbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":563 + /* "ssh/session.pyx":559 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10441,7 +10525,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py } } - /* "ssh/session.pyx":565 + /* "ssh/session.pyx":561 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10451,7 +10535,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":566 + /* "ssh/session.pyx":562 * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10462,7 +10546,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":565 + /* "ssh/session.pyx":561 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10471,19 +10555,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py */ } - /* "ssh/session.pyx":567 + /* "ssh/session.pyx":563 * 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, 567, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":568 + /* "ssh/session.pyx":564 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10495,7 +10579,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":560 + /* "ssh/session.pyx":556 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10515,7 +10599,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":570 +/* "ssh/session.pyx":566 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10549,7 +10633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_kex_algo", 0); - /* "ssh/session.pyx":573 + /* "ssh/session.pyx":569 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10564,7 +10648,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":574 + /* "ssh/session.pyx":570 * cdef bytes algo * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) # <<<<<<<<<<<<<< @@ -10574,7 +10658,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_v__algo = ssh_get_kex_algo(__pyx_v_self->_session); } - /* "ssh/session.pyx":573 + /* "ssh/session.pyx":569 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10593,7 +10677,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob } } - /* "ssh/session.pyx":575 + /* "ssh/session.pyx":571 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10603,7 +10687,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_t_1 = ((__pyx_v__algo == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":576 + /* "ssh/session.pyx":572 * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: * return # <<<<<<<<<<<<<< @@ -10614,7 +10698,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":575 + /* "ssh/session.pyx":571 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10623,19 +10707,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob */ } - /* "ssh/session.pyx":577 + /* "ssh/session.pyx":573 * 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, 577, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_algo = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":578 + /* "ssh/session.pyx":574 * return * algo = _algo * return algo # <<<<<<<<<<<<<< @@ -10647,7 +10731,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = __pyx_v_algo; goto __pyx_L0; - /* "ssh/session.pyx":570 + /* "ssh/session.pyx":566 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10667,7 +10751,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":580 +/* "ssh/session.pyx":576 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10701,7 +10785,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_in", 0); - /* "ssh/session.pyx":583 + /* "ssh/session.pyx":579 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10716,7 +10800,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":584 + /* "ssh/session.pyx":580 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) # <<<<<<<<<<<<<< @@ -10726,7 +10810,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_v__cipher = ssh_get_cipher_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":583 + /* "ssh/session.pyx":579 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10745,7 +10829,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o } } - /* "ssh/session.pyx":585 + /* "ssh/session.pyx":581 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10755,7 +10839,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":586 + /* "ssh/session.pyx":582 * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10766,7 +10850,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":585 + /* "ssh/session.pyx":581 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10775,19 +10859,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o */ } - /* "ssh/session.pyx":587 + /* "ssh/session.pyx":583 * 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, 587, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":588 + /* "ssh/session.pyx":584 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10799,7 +10883,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":580 + /* "ssh/session.pyx":576 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10819,7 +10903,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":590 +/* "ssh/session.pyx":586 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -10853,7 +10937,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_out", 0); - /* "ssh/session.pyx":593 + /* "ssh/session.pyx":589 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10868,7 +10952,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":594 + /* "ssh/session.pyx":590 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) # <<<<<<<<<<<<<< @@ -10878,7 +10962,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_v__cipher = ssh_get_cipher_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":593 + /* "ssh/session.pyx":589 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10897,7 +10981,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ } } - /* "ssh/session.pyx":595 + /* "ssh/session.pyx":591 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10907,7 +10991,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":596 + /* "ssh/session.pyx":592 * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10918,7 +11002,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":595 + /* "ssh/session.pyx":591 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10927,19 +11011,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ */ } - /* "ssh/session.pyx":597 + /* "ssh/session.pyx":593 * 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, 597, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":598 + /* "ssh/session.pyx":594 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10951,7 +11035,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":590 + /* "ssh/session.pyx":586 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -10971,7 +11055,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":600 +/* "ssh/session.pyx":596 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11005,7 +11089,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_in", 0); - /* "ssh/session.pyx":603 + /* "ssh/session.pyx":599 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11020,7 +11104,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":604 + /* "ssh/session.pyx":600 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) # <<<<<<<<<<<<<< @@ -11030,7 +11114,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_v__hmac = ssh_get_hmac_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":603 + /* "ssh/session.pyx":599 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11049,7 +11133,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj } } - /* "ssh/session.pyx":605 + /* "ssh/session.pyx":601 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11059,7 +11143,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":606 + /* "ssh/session.pyx":602 * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11070,7 +11154,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":605 + /* "ssh/session.pyx":601 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11079,19 +11163,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj */ } - /* "ssh/session.pyx":607 + /* "ssh/session.pyx":603 * 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, 607, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":608 + /* "ssh/session.pyx":604 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11103,7 +11187,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":600 + /* "ssh/session.pyx":596 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11123,7 +11207,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":610 +/* "ssh/session.pyx":606 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11157,7 +11241,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_out", 0); - /* "ssh/session.pyx":613 + /* "ssh/session.pyx":609 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11172,7 +11256,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":614 + /* "ssh/session.pyx":610 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) # <<<<<<<<<<<<<< @@ -11182,7 +11266,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_v__hmac = ssh_get_hmac_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":613 + /* "ssh/session.pyx":609 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11201,7 +11285,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob } } - /* "ssh/session.pyx":615 + /* "ssh/session.pyx":611 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11211,7 +11295,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":616 + /* "ssh/session.pyx":612 * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11222,7 +11306,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":615 + /* "ssh/session.pyx":611 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11231,19 +11315,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob */ } - /* "ssh/session.pyx":617 + /* "ssh/session.pyx":613 * 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, 617, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":618 + /* "ssh/session.pyx":614 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11255,7 +11339,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":610 + /* "ssh/session.pyx":606 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11275,7 +11359,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":620 +/* "ssh/session.pyx":616 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11310,7 +11394,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error", 0); - /* "ssh/session.pyx":623 + /* "ssh/session.pyx":619 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11325,7 +11409,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":624 + /* "ssh/session.pyx":620 * cdef bytes b_error * with nogil: * error = c_ssh.ssh_get_error(self._session) # <<<<<<<<<<<<<< @@ -11335,7 +11419,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_v_error = ssh_get_error(__pyx_v_self->_session); } - /* "ssh/session.pyx":623 + /* "ssh/session.pyx":619 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11354,7 +11438,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 } } - /* "ssh/session.pyx":625 + /* "ssh/session.pyx":621 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11364,7 +11448,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v_error == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":626 + /* "ssh/session.pyx":622 * error = c_ssh.ssh_get_error(self._session) * if error is NULL: * return # <<<<<<<<<<<<<< @@ -11375,7 +11459,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":625 + /* "ssh/session.pyx":621 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11384,19 +11468,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 */ } - /* "ssh/session.pyx":627 + /* "ssh/session.pyx":623 * 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, 627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_error = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":628 + /* "ssh/session.pyx":624 * return * b_error = error * return to_str(b_error) # <<<<<<<<<<<<<< @@ -11404,14 +11488,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_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, 628, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":620 + /* "ssh/session.pyx":616 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11431,7 +11515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":630 +/* "ssh/session.pyx":626 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11463,7 +11547,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_code", 0); - /* "ssh/session.pyx":632 + /* "ssh/session.pyx":628 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11478,7 +11562,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":633 + /* "ssh/session.pyx":629 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) # <<<<<<<<<<<<<< @@ -11488,7 +11572,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ __pyx_v_rc = ssh_get_error_code(__pyx_v_self->_session); } - /* "ssh/session.pyx":632 + /* "ssh/session.pyx":628 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11507,7 +11591,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ } } - /* "ssh/session.pyx":634 + /* "ssh/session.pyx":630 * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) * return rc # <<<<<<<<<<<<<< @@ -11515,13 +11599,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_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, 634, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":630 + /* "ssh/session.pyx":626 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11540,7 +11624,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":636 +/* "ssh/session.pyx":632 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -11583,11 +11667,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_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, 636, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 632, __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, 636, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 632, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11595,19 +11679,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_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, 636, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 632, __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, 636, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 632, __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, 636, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 632, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_140scp_new(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_mode, __pyx_v_location); @@ -11635,19 +11719,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scp_new", 0); - /* "ssh/session.pyx":639 + /* "ssh/session.pyx":635 * """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, 639, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_location = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":640 + /* "ssh/session.pyx":636 * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location # <<<<<<<<<<<<<< @@ -11656,12 +11740,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_location == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 640, __pyx_L1_error) + __PYX_ERR(0, 636, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error) __pyx_v_c_location = __pyx_t_2; - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":637 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11676,7 +11760,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":642 + /* "ssh/session.pyx":638 * cdef char *c_location = b_location * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) # <<<<<<<<<<<<<< @@ -11685,7 +11769,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_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":643 + /* "ssh/session.pyx":639 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11695,7 +11779,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((__pyx_v__scp == NULL) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":644 + /* "ssh/session.pyx":640 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11708,7 +11792,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":641 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11717,30 +11801,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":642 * 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, 645, __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, 641, __pyx_L8_error) - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":641 * 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, 645, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":644 + /* "ssh/session.pyx":640 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11763,7 +11847,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":643 + /* "ssh/session.pyx":639 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11772,7 +11856,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":643 * 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: # <<<<<<<<<<<<<< @@ -11782,7 +11866,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((ssh_scp_init(__pyx_v__scp) != SSH_OK) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":648 + /* "ssh/session.pyx":644 * 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) # <<<<<<<<<<<<<< @@ -11791,7 +11875,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ ssh_scp_free(__pyx_v__scp); - /* "ssh/session.pyx":649 + /* "ssh/session.pyx":645 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11804,7 +11888,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":650 + /* "ssh/session.pyx":646 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11813,29 +11897,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":651 + /* "ssh/session.pyx":647 * 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, 650, __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, 646, __pyx_L12_error) - /* "ssh/session.pyx":650 + /* "ssh/session.pyx":646 * 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, 650, __pyx_L12_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_return; } - /* "ssh/session.pyx":649 + /* "ssh/session.pyx":645 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11858,7 +11942,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":643 * 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: # <<<<<<<<<<<<<< @@ -11868,7 +11952,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":637 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11901,19 +11985,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":652 + /* "ssh/session.pyx":648 * 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, 652, __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, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":636 + /* "ssh/session.pyx":632 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -12392,7 +12476,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, 218, __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:; diff --git a/ssh/session.pyx b/ssh/session.pyx index 97c6e131..ca5cc9a3 100644 --- a/ssh/session.pyx +++ b/ssh/session.pyx @@ -141,15 +141,11 @@ cdef class Session: return handle_error_codes(rc, self._session) def disconnect(self): - """No-op. Handled by object de-allocation.""" - # Due to bug in libssh that segfaults if session - # is disconnected before freeing channels spawned - # by that session - even if channels are closed. - pass - # if not c_ssh.ssh_is_connected(self._session): - # return - # with nogil: - # c_ssh.ssh_disconnect(self._session) + """Disconnect session and close socket""" + if not c_ssh.ssh_is_connected(self._session): + return + with nogil: + c_ssh.ssh_disconnect(self._session) def connector_new(self): cdef c_ssh.ssh_connector _connector From c75d61ebfed2bb4f3901399fcd9f57f67c4ee04a Mon Sep 17 00:00:00 2001 From: Panos Date: Sat, 22 Aug 2020 12:34:41 +0100 Subject: [PATCH 11/11] Updated session --- Changelog.rst | 1 - ssh/session.c | 1490 ++++++++++++++++++++++------------------------- ssh/session.pyx | 14 +- 3 files changed, 712 insertions(+), 793 deletions(-) diff --git a/Changelog.rst b/Changelog.rst index aea4c4b2..d675433c 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -10,7 +10,6 @@ Changes * Updated exception handling to match libssh API - `ssh.exceptions.SSHError` raised on all non-specific errors. * Updated authentication exception handling to raise specific authentication errors. -* Added `Session.disconnect` implementation. * Channel object initialisation now requires Session object to be passed in. diff --git a/ssh/session.c b/ssh/session.c index bab9f091..40258720 100644 --- a/ssh/session.c +++ b/ssh/session.c @@ -1661,7 +1661,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self, int __pyx_v_timeout, int __pyx_v_dest_port); /* proto */ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self, PyObject *__pyx_v_address, int __pyx_v_port); /* proto */ @@ -3094,13 +3094,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh * return handle_error_codes(rc, self._session) * * def disconnect(self): # <<<<<<<<<<<<<< - * """Disconnect session and close socket""" - * if not c_ssh.ssh_is_connected(self._session): + * """No-op. Handled by object de-allocation.""" + * # Due to bug in libssh that segfaults if session */ /* Python wrapper */ static PyObject *__pyx_pw_3ssh_7session_7Session_17disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_3ssh_7session_7Session_16disconnect[] = "Session.disconnect(self)\nDisconnect session and close socket"; +static char __pyx_doc_3ssh_7session_7Session_16disconnect[] = "Session.disconnect(self)\nNo-op. Handled by object de-allocation."; static PyObject *__pyx_pw_3ssh_7session_7Session_17disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -3112,104 +3112,20 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_17disconnect(PyObject *__pyx_v_ return __pyx_r; } -static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED struct __pyx_obj_3ssh_7session_Session *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - int __pyx_t_1; __Pyx_RefNannySetupContext("disconnect", 0); - /* "ssh/session.pyx":145 - * def disconnect(self): - * """Disconnect session and close socket""" - * if not c_ssh.ssh_is_connected(self._session): # <<<<<<<<<<<<<< - * return - * with nogil: - */ - __pyx_t_1 = ((!(ssh_is_connected(__pyx_v_self->_session) != 0)) != 0); - if (__pyx_t_1) { - - /* "ssh/session.pyx":146 - * """Disconnect session and close socket""" - * if not c_ssh.ssh_is_connected(self._session): - * return # <<<<<<<<<<<<<< - * with nogil: - * c_ssh.ssh_disconnect(self._session) - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "ssh/session.pyx":145 - * def disconnect(self): - * """Disconnect session and close socket""" - * if not c_ssh.ssh_is_connected(self._session): # <<<<<<<<<<<<<< - * return - * with nogil: - */ - } - - /* "ssh/session.pyx":147 - * if not c_ssh.ssh_is_connected(self._session): - * return - * with nogil: # <<<<<<<<<<<<<< - * c_ssh.ssh_disconnect(self._session) - * - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "ssh/session.pyx":148 - * return - * with nogil: - * c_ssh.ssh_disconnect(self._session) # <<<<<<<<<<<<<< - * - * def connector_new(self): - */ - ssh_disconnect(__pyx_v_self->_session); - } - - /* "ssh/session.pyx":147 - * if not c_ssh.ssh_is_connected(self._session): - * return - * with nogil: # <<<<<<<<<<<<<< - * c_ssh.ssh_disconnect(self._session) - * - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L6; - } - __pyx_L6:; - } - } - - /* "ssh/session.pyx":143 - * return handle_error_codes(rc, self._session) - * - * def disconnect(self): # <<<<<<<<<<<<<< - * """Disconnect session and close socket""" - * if not c_ssh.ssh_is_connected(self._session): - */ - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "ssh/session.pyx":150 - * c_ssh.ssh_disconnect(self._session) +/* "ssh/session.pyx":154 + * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< * cdef c_ssh.ssh_connector _connector @@ -3241,7 +3157,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":152 + /* "ssh/session.pyx":156 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3256,7 +3172,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":153 + /* "ssh/session.pyx":157 * cdef c_ssh.ssh_connector _connector * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) # <<<<<<<<<<<<<< @@ -3266,7 +3182,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":152 + /* "ssh/session.pyx":156 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3285,7 +3201,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob } } - /* "ssh/session.pyx":154 + /* "ssh/session.pyx":158 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3295,7 +3211,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":155 + /* "ssh/session.pyx":159 * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: * return # <<<<<<<<<<<<<< @@ -3306,7 +3222,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":154 + /* "ssh/session.pyx":158 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3315,7 +3231,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob */ } - /* "ssh/session.pyx":156 + /* "ssh/session.pyx":160 * if _connector is NULL: * return * return Connector.from_ptr(_connector, self) # <<<<<<<<<<<<<< @@ -3323,14 +3239,14 @@ 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, 156, __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, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":150 - * c_ssh.ssh_disconnect(self._session) + /* "ssh/session.pyx":154 + * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< * cdef c_ssh.ssh_connector _connector @@ -3348,7 +3264,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":158 +/* "ssh/session.pyx":162 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3391,11 +3307,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, 158, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, 1); __PYX_ERR(0, 162, __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, 158, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "accept_forward") < 0)) __PYX_ERR(0, 162, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3403,12 +3319,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, 158, __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, 158, __pyx_L3_error) + __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) } 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, 158, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 162, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.accept_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3432,7 +3348,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":160 + /* "ssh/session.pyx":164 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3447,16 +3363,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":161 + /* "ssh/session.pyx":165 * 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, 161, __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, 165, __pyx_L4_error) - /* "ssh/session.pyx":162 + /* "ssh/session.pyx":166 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_accept_forward( # <<<<<<<<<<<<<< @@ -3466,7 +3382,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":160 + /* "ssh/session.pyx":164 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3492,7 +3408,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o } } - /* "ssh/session.pyx":164 + /* "ssh/session.pyx":168 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3502,7 +3418,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":165 + /* "ssh/session.pyx":169 * self._session, timeout, &dest_port) * if _channel is NULL: * return # <<<<<<<<<<<<<< @@ -3513,7 +3429,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":164 + /* "ssh/session.pyx":168 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3522,7 +3438,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o */ } - /* "ssh/session.pyx":166 + /* "ssh/session.pyx":170 * if _channel is NULL: * return * return Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< @@ -3530,13 +3446,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, 166, __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, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":162 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3555,7 +3471,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":168 +/* "ssh/session.pyx":172 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3598,11 +3514,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, 168, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, 1); __PYX_ERR(0, 172, __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, 168, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_forward") < 0)) __PYX_ERR(0, 172, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3611,18 +3527,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, 168, __pyx_L3_error) + __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) } 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, 168, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 172, __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, 168, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 172, __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); @@ -3649,19 +3565,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":169 + /* "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 * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":170 + /* "ssh/session.pyx":174 * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3670,12 +3586,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, 170, __pyx_L1_error) + __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, 170, __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_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":172 + /* "ssh/session.pyx":176 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3690,7 +3606,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":173 + /* "ssh/session.pyx":177 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_cancel_forward( # <<<<<<<<<<<<<< @@ -3700,7 +3616,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":172 + /* "ssh/session.pyx":176 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3719,7 +3635,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o } } - /* "ssh/session.pyx":175 + /* "ssh/session.pyx":179 * rc = c_ssh.ssh_channel_cancel_forward( * self._session, c_address, port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3727,14 +3643,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, 175, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":168 + /* "ssh/session.pyx":172 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3754,7 +3670,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":177 +/* "ssh/session.pyx":181 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3800,17 +3716,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, 177, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 1); __PYX_ERR(0, 181, __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, 177, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 2); __PYX_ERR(0, 181, __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, 177, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "listen_forward") < 0)) __PYX_ERR(0, 181, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3820,19 +3736,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, 177, __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, 177, __pyx_L3_error) + __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) } 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, 177, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 181, __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, 177, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 181, __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); @@ -3859,19 +3775,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":178 + /* "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 * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":179 + /* "ssh/session.pyx":183 * 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 # <<<<<<<<<<<<<< @@ -3880,12 +3796,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, 179, __pyx_L1_error) + __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, 179, __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_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":181 + /* "ssh/session.pyx":185 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3900,7 +3816,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":182 + /* "ssh/session.pyx":186 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_listen_forward( # <<<<<<<<<<<<<< @@ -3910,7 +3826,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":181 + /* "ssh/session.pyx":185 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3929,7 +3845,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o } } - /* "ssh/session.pyx":184 + /* "ssh/session.pyx":188 * rc = c_ssh.ssh_channel_listen_forward( * self._session, c_address, port, &bound_port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3937,14 +3853,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, 184, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":177 + /* "ssh/session.pyx":181 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3964,7 +3880,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":186 +/* "ssh/session.pyx":190 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -3998,7 +3914,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":189 + /* "ssh/session.pyx":193 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -4013,16 +3929,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct #endif /*try:*/ { - /* "ssh/session.pyx":190 + /* "ssh/session.pyx":194 * 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, 190, __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, 194, __pyx_L4_error) - /* "ssh/session.pyx":191 + /* "ssh/session.pyx":195 * with nogil: * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) # <<<<<<<<<<<<<< @@ -4032,7 +3948,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":189 + /* "ssh/session.pyx":193 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -4058,19 +3974,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct } } - /* "ssh/session.pyx":192 + /* "ssh/session.pyx":196 * _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, 192, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_message = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":193 + /* "ssh/session.pyx":197 * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message * return b_message # <<<<<<<<<<<<<< @@ -4082,7 +3998,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct __pyx_r = __pyx_v_b_message; goto __pyx_L0; - /* "ssh/session.pyx":186 + /* "ssh/session.pyx":190 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -4102,7 +4018,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct return __pyx_r; } -/* "ssh/session.pyx":195 +/* "ssh/session.pyx":199 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4134,7 +4050,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":197 + /* "ssh/session.pyx":201 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4149,7 +4065,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/session.pyx":198 + /* "ssh/session.pyx":202 * cdef c_ssh.socket_t _sock * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) # <<<<<<<<<<<<<< @@ -4159,7 +4075,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":197 + /* "ssh/session.pyx":201 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4178,7 +4094,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ } } - /* "ssh/session.pyx":199 + /* "ssh/session.pyx":203 * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) * return _sock # <<<<<<<<<<<<<< @@ -4186,13 +4102,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, 199, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_socket_t(__pyx_v__sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":195 + /* "ssh/session.pyx":199 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4211,7 +4127,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/session.pyx":201 +/* "ssh/session.pyx":205 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4245,7 +4161,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":204 + /* "ssh/session.pyx":208 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4260,16 +4176,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":205 + /* "ssh/session.pyx":209 * 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, 205, __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, 209, __pyx_L4_error) - /* "ssh/session.pyx":206 + /* "ssh/session.pyx":210 * with nogil: * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) # <<<<<<<<<<<<<< @@ -4279,7 +4195,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":204 + /* "ssh/session.pyx":208 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4305,19 +4221,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx } } - /* "ssh/session.pyx":207 + /* "ssh/session.pyx":211 * _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, 207, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":208 + /* "ssh/session.pyx":212 * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -4329,7 +4245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":201 + /* "ssh/session.pyx":205 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4349,7 +4265,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":210 +/* "ssh/session.pyx":214 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4382,7 +4298,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":212 + /* "ssh/session.pyx":216 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4397,16 +4313,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ #endif /*try:*/ { - /* "ssh/session.pyx":213 + /* "ssh/session.pyx":217 * 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, 213, __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, 217, __pyx_L4_error) - /* "ssh/session.pyx":214 + /* "ssh/session.pyx":218 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) # <<<<<<<<<<<<<< @@ -4416,7 +4332,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":212 + /* "ssh/session.pyx":216 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4442,7 +4358,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ } } - /* "ssh/session.pyx":215 + /* "ssh/session.pyx":219 * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4450,13 +4366,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, 215, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":210 + /* "ssh/session.pyx":214 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4475,7 +4391,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ return __pyx_r; } -/* "ssh/session.pyx":217 +/* "ssh/session.pyx":221 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4505,7 +4421,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":218 + /* "ssh/session.pyx":222 * * def get_server_publickey(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -4513,9 +4429,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, 218, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) - /* "ssh/session.pyx":217 + /* "ssh/session.pyx":221 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4532,7 +4448,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U return __pyx_r; } -/* "ssh/session.pyx":220 +/* "ssh/session.pyx":224 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4564,7 +4480,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":222 + /* "ssh/session.pyx":226 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4579,7 +4495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":223 + /* "ssh/session.pyx":227 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_version(self._session) # <<<<<<<<<<<<<< @@ -4589,7 +4505,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":222 + /* "ssh/session.pyx":226 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4608,7 +4524,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ } } - /* "ssh/session.pyx":224 + /* "ssh/session.pyx":228 * with nogil: * rc = c_ssh.ssh_get_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4616,13 +4532,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, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":220 + /* "ssh/session.pyx":224 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4641,7 +4557,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":226 +/* "ssh/session.pyx":230 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4673,7 +4589,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":228 + /* "ssh/session.pyx":232 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4688,7 +4604,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":229 + /* "ssh/session.pyx":233 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_status(self._session) # <<<<<<<<<<<<<< @@ -4698,7 +4614,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":228 + /* "ssh/session.pyx":232 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4717,7 +4633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 } } - /* "ssh/session.pyx":230 + /* "ssh/session.pyx":234 * with nogil: * rc = c_ssh.ssh_get_status(self._session) * return rc # <<<<<<<<<<<<<< @@ -4725,13 +4641,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, 230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":226 + /* "ssh/session.pyx":230 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4750,7 +4666,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":232 +/* "ssh/session.pyx":236 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4782,7 +4698,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":234 + /* "ssh/session.pyx":238 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4797,7 +4713,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":235 + /* "ssh/session.pyx":239 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) # <<<<<<<<<<<<<< @@ -4807,7 +4723,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":234 + /* "ssh/session.pyx":238 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4826,7 +4742,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o } } - /* "ssh/session.pyx":236 + /* "ssh/session.pyx":240 * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) * return rc # <<<<<<<<<<<<<< @@ -4834,13 +4750,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, 236, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":232 + /* "ssh/session.pyx":236 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4859,7 +4775,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":238 +/* "ssh/session.pyx":242 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4892,7 +4808,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":240 + /* "ssh/session.pyx":244 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4907,7 +4823,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":241 + /* "ssh/session.pyx":245 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) # <<<<<<<<<<<<<< @@ -4917,7 +4833,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":240 + /* "ssh/session.pyx":244 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4936,7 +4852,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ } } - /* "ssh/session.pyx":242 + /* "ssh/session.pyx":246 * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4945,13 +4861,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, 242, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":238 + /* "ssh/session.pyx":242 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4970,7 +4886,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":244 +/* "ssh/session.pyx":248 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -5003,7 +4919,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":246 + /* "ssh/session.pyx":250 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5018,7 +4934,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":247 + /* "ssh/session.pyx":251 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_connected(self._session) # <<<<<<<<<<<<<< @@ -5028,7 +4944,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":246 + /* "ssh/session.pyx":250 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5047,7 +4963,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj } } - /* "ssh/session.pyx":248 + /* "ssh/session.pyx":252 * with nogil: * rc = c_ssh.ssh_is_connected(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5056,13 +4972,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, 248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":244 + /* "ssh/session.pyx":248 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -5081,7 +4997,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":250 +/* "ssh/session.pyx":254 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5114,7 +5030,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":252 + /* "ssh/session.pyx":256 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5129,7 +5045,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":253 + /* "ssh/session.pyx":257 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) # <<<<<<<<<<<<<< @@ -5139,7 +5055,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":252 + /* "ssh/session.pyx":256 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5158,7 +5074,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ } } - /* "ssh/session.pyx":254 + /* "ssh/session.pyx":258 * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5167,13 +5083,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, 254, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":250 + /* "ssh/session.pyx":254 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5192,7 +5108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":256 +/* "ssh/session.pyx":260 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5210,7 +5126,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, 256, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_destination), __pyx_ptype_3ssh_7session_Session, 1, "destination", 0))) __PYX_ERR(0, 260, __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 */ @@ -5233,7 +5149,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":258 + /* "ssh/session.pyx":262 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5248,7 +5164,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":259 + /* "ssh/session.pyx":263 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) # <<<<<<<<<<<<<< @@ -5258,7 +5174,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":258 + /* "ssh/session.pyx":262 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5277,7 +5193,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj } } - /* "ssh/session.pyx":260 + /* "ssh/session.pyx":264 * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5285,14 +5201,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, 260, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __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, 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_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":256 + /* "ssh/session.pyx":260 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5311,7 +5227,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":262 +/* "ssh/session.pyx":266 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5341,7 +5257,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_getopt", 0); - /* "ssh/session.pyx":263 + /* "ssh/session.pyx":267 * * def options_getopt(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -5349,9 +5265,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, 263, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) - /* "ssh/session.pyx":262 + /* "ssh/session.pyx":266 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5368,7 +5284,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED return __pyx_r; } -/* "ssh/session.pyx":265 +/* "ssh/session.pyx":269 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5404,19 +5320,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":266 + /* "ssh/session.pyx":270 * * 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, 266, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_b_filepath = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":267 + /* "ssh/session.pyx":271 * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) * cdef char *c_filepath = b_filepath # <<<<<<<<<<<<<< @@ -5425,12 +5341,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, 267, __pyx_L1_error) + __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, 267, __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_v_c_filepath = __pyx_t_2; - /* "ssh/session.pyx":269 + /* "ssh/session.pyx":273 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5445,7 +5361,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ #endif /*try:*/ { - /* "ssh/session.pyx":270 + /* "ssh/session.pyx":274 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) # <<<<<<<<<<<<<< @@ -5455,7 +5371,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":269 + /* "ssh/session.pyx":273 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5474,7 +5390,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ } } - /* "ssh/session.pyx":271 + /* "ssh/session.pyx":275 * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5482,14 +5398,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, 271, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":265 + /* "ssh/session.pyx":269 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5509,7 +5425,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ return __pyx_r; } -/* "ssh/session.pyx":273 +/* "ssh/session.pyx":277 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5529,7 +5445,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, 273, __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, 277, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5555,7 +5471,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":275 + /* "ssh/session.pyx":279 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5570,7 +5486,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":276 + /* "ssh/session.pyx":280 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_set( # <<<<<<<<<<<<<< @@ -5580,7 +5496,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":275 + /* "ssh/session.pyx":279 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5599,7 +5515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx } } - /* "ssh/session.pyx":278 + /* "ssh/session.pyx":282 * rc = c_ssh.ssh_options_set( * self._session, c_ssh.ssh_options_e.SSH_OPTIONS_PORT, &port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5607,14 +5523,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx * 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, 278, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __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, 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_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":273 + /* "ssh/session.pyx":277 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5633,7 +5549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":280 +/* "ssh/session.pyx":284 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5676,11 +5592,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_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, 280, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 284, __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, 280, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 284, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5693,13 +5609,13 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_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, 280, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 284, __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, 280, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 284, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_56options_set(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_option, __pyx_v_value); /* function exit code */ @@ -5725,19 +5641,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set", 0); - /* "ssh/session.pyx":289 + /* "ssh/session.pyx":293 * :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, 289, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":292 + /* "ssh/session.pyx":296 * cdef char *c_value * cdef int rc * c_value = b_value # <<<<<<<<<<<<<< @@ -5746,12 +5662,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 292, __pyx_L1_error) + __PYX_ERR(0, 296, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/session.pyx":293 + /* "ssh/session.pyx":297 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5766,7 +5682,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":294 + /* "ssh/session.pyx":298 * c_value = b_value * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) # <<<<<<<<<<<<<< @@ -5776,7 +5692,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_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":293 + /* "ssh/session.pyx":297 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5795,7 +5711,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ } } - /* "ssh/session.pyx":295 + /* "ssh/session.pyx":299 * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5803,14 +5719,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_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, 295, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __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, 299, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":280 + /* "ssh/session.pyx":284 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5830,7 +5746,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":297 +/* "ssh/session.pyx":301 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5848,7 +5764,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_59options_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, 297, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 301, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_58options_get(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7options_Option *)__pyx_v_option)); /* function exit code */ @@ -5875,7 +5791,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get", 0); - /* "ssh/session.pyx":302 + /* "ssh/session.pyx":306 * """ * cdef char *_value * cdef char **value = NULL # <<<<<<<<<<<<<< @@ -5884,7 +5800,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v_value = NULL; - /* "ssh/session.pyx":305 + /* "ssh/session.pyx":309 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5899,7 +5815,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":306 + /* "ssh/session.pyx":310 * cdef bytes b_value * with nogil: * rc = c_ssh.ssh_options_get( # <<<<<<<<<<<<<< @@ -5909,7 +5825,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_v_rc = ssh_options_get(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_value); } - /* "ssh/session.pyx":305 + /* "ssh/session.pyx":309 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5928,7 +5844,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ } } - /* "ssh/session.pyx":308 + /* "ssh/session.pyx":312 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5938,20 +5854,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_rc < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/session.pyx":309 + /* "ssh/session.pyx":313 * 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, 309, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __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, 309, __pyx_L1_error) + __PYX_ERR(0, 313, __pyx_L1_error) - /* "ssh/session.pyx":308 + /* "ssh/session.pyx":312 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5960,7 +5876,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ } - /* "ssh/session.pyx":310 + /* "ssh/session.pyx":314 * if rc < 0: * raise OptionError * _value = value[0] # <<<<<<<<<<<<<< @@ -5969,19 +5885,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v__value = (__pyx_v_value[0]); - /* "ssh/session.pyx":311 + /* "ssh/session.pyx":315 * 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, 311, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_value = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":312 + /* "ssh/session.pyx":316 * _value = value[0] * b_value = _value * c_ssh.ssh_string_free_char(_value) # <<<<<<<<<<<<<< @@ -5990,7 +5906,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ ssh_string_free_char(__pyx_v__value); - /* "ssh/session.pyx":313 + /* "ssh/session.pyx":317 * b_value = _value * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) # <<<<<<<<<<<<<< @@ -5998,14 +5914,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_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, 313, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":297 + /* "ssh/session.pyx":301 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -6025,7 +5941,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":315 +/* "ssh/session.pyx":319 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6045,7 +5961,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_61options_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, 315, __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, 319, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6071,7 +5987,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get_port", 0); - /* "ssh/session.pyx":317 + /* "ssh/session.pyx":321 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6086,7 +6002,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":318 + /* "ssh/session.pyx":322 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) # <<<<<<<<<<<<<< @@ -6096,7 +6012,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx __pyx_v_rc = ssh_options_get_port(__pyx_v_self->_session, (&__pyx_v_port_target)); } - /* "ssh/session.pyx":317 + /* "ssh/session.pyx":321 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6115,7 +6031,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx } } - /* "ssh/session.pyx":319 + /* "ssh/session.pyx":323 * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6123,14 +6039,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_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, 319, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __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, 323, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __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":319 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6149,7 +6065,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":321 +/* "ssh/session.pyx":325 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6167,7 +6083,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_63send_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, 321, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 325, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_62send_ignore(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6192,7 +6108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_ignore", 0); - /* "ssh/session.pyx":322 + /* "ssh/session.pyx":326 * * def send_ignore(self, bytes data): * cdef char *c_data = data # <<<<<<<<<<<<<< @@ -6201,12 +6117,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 326, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 326, __pyx_L1_error) __pyx_v_c_data = __pyx_t_1; - /* "ssh/session.pyx":324 + /* "ssh/session.pyx":328 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6221,7 +6137,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":325 + /* "ssh/session.pyx":329 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) # <<<<<<<<<<<<<< @@ -6231,7 +6147,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ __pyx_v_rc = ssh_send_ignore(__pyx_v_self->_session, __pyx_v_c_data); } - /* "ssh/session.pyx":324 + /* "ssh/session.pyx":328 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6250,7 +6166,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ } } - /* "ssh/session.pyx":326 + /* "ssh/session.pyx":330 * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6258,14 +6174,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_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, 326, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __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, 330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":321 + /* "ssh/session.pyx":325 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6284,7 +6200,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":328 +/* "ssh/session.pyx":332 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6327,11 +6243,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_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, 328, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 332, __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, 328, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 332, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6340,17 +6256,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_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, 328, __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, 332, __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, 328, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 332, __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, 328, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 332, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_64send_debug(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_message, __pyx_v_always_display); /* function exit code */ @@ -6375,7 +6291,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_debug", 0); - /* "ssh/session.pyx":329 + /* "ssh/session.pyx":333 * * def send_debug(self, bytes message, int always_display): * cdef char *c_message = message # <<<<<<<<<<<<<< @@ -6384,12 +6300,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 */ if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 329, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L1_error) __pyx_v_c_message = __pyx_t_1; - /* "ssh/session.pyx":331 + /* "ssh/session.pyx":335 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6404,7 +6320,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":332 + /* "ssh/session.pyx":336 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_debug( # <<<<<<<<<<<<<< @@ -6414,7 +6330,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_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":331 + /* "ssh/session.pyx":335 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6433,7 +6349,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 } } - /* "ssh/session.pyx":334 + /* "ssh/session.pyx":338 * rc = c_ssh.ssh_send_debug( * self._session, c_message, always_display) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6441,14 +6357,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 * def gssapi_set_creds(self, creds): */ __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, 334, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __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, 338, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":328 + /* "ssh/session.pyx":332 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6467,7 +6383,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":336 +/* "ssh/session.pyx":340 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6497,7 +6413,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gssapi_set_creds", 0); - /* "ssh/session.pyx":337 + /* "ssh/session.pyx":341 * * def gssapi_set_creds(self, creds): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6505,9 +6421,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE * def service_request(self, bytes service): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 337, __pyx_L1_error) + __PYX_ERR(0, 341, __pyx_L1_error) - /* "ssh/session.pyx":336 + /* "ssh/session.pyx":340 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6524,7 +6440,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE return __pyx_r; } -/* "ssh/session.pyx":339 +/* "ssh/session.pyx":343 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6542,7 +6458,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_69service_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, 339, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 343, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_68service_request(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_service)); /* function exit code */ @@ -6567,7 +6483,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("service_request", 0); - /* "ssh/session.pyx":341 + /* "ssh/session.pyx":345 * def service_request(self, bytes service): * cdef int rc * cdef char *c_service = service # <<<<<<<<<<<<<< @@ -6576,12 +6492,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ */ if (unlikely(__pyx_v_service == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 341, __pyx_L1_error) + __PYX_ERR(0, 345, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L1_error) __pyx_v_c_service = __pyx_t_1; - /* "ssh/session.pyx":342 + /* "ssh/session.pyx":346 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6596,7 +6512,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":343 + /* "ssh/session.pyx":347 * cdef char *c_service = service * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) # <<<<<<<<<<<<<< @@ -6606,7 +6522,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ __pyx_v_rc = ssh_service_request(__pyx_v_self->_session, __pyx_v_c_service); } - /* "ssh/session.pyx":342 + /* "ssh/session.pyx":346 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6625,7 +6541,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ } } - /* "ssh/session.pyx":344 + /* "ssh/session.pyx":348 * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6633,14 +6549,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_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, 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, 348, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __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":343 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6659,7 +6575,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":348 +/* "ssh/session.pyx":352 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6677,7 +6593,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_71set_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, 348, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 352, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_70set_agent_channel(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_channel)); /* function exit code */ @@ -6700,7 +6616,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_channel", 0); - /* "ssh/session.pyx":350 + /* "ssh/session.pyx":354 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6715,7 +6631,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":351 + /* "ssh/session.pyx":355 * cdef int rc * with nogil: * rc = c_ssh.ssh_set_agent_channel( # <<<<<<<<<<<<<< @@ -6725,7 +6641,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py __pyx_v_rc = ssh_set_agent_channel(__pyx_v_self->_session, __pyx_v_channel->_channel); } - /* "ssh/session.pyx":350 + /* "ssh/session.pyx":354 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6744,7 +6660,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py } } - /* "ssh/session.pyx":353 + /* "ssh/session.pyx":357 * rc = c_ssh.ssh_set_agent_channel( * self._session, channel._channel) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6752,14 +6668,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_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, 353, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __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, 357, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":348 + /* "ssh/session.pyx":352 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6778,7 +6694,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py return __pyx_r; } -/* "ssh/session.pyx":355 +/* "ssh/session.pyx":359 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6797,7 +6713,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_73set_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, 355, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 359, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_72set_agent_socket(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_socket)); @@ -6822,17 +6738,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_socket", 0); - /* "ssh/session.pyx":357 + /* "ssh/session.pyx":361 * 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, 357, __pyx_L1_error) + __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) __pyx_v__sock = __pyx_t_1; - /* "ssh/session.pyx":358 + /* "ssh/session.pyx":362 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6847,7 +6763,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":359 + /* "ssh/session.pyx":363 * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) # <<<<<<<<<<<<<< @@ -6857,7 +6773,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx __pyx_v_rc = ssh_set_agent_socket(__pyx_v_self->_session, __pyx_v__sock); } - /* "ssh/session.pyx":358 + /* "ssh/session.pyx":362 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6876,7 +6792,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx } } - /* "ssh/session.pyx":360 + /* "ssh/session.pyx":364 * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6884,14 +6800,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_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, 360, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __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, 364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":355 + /* "ssh/session.pyx":359 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6910,7 +6826,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":362 +/* "ssh/session.pyx":366 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6930,7 +6846,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_75set_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, 362, __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, 366, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6950,7 +6866,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/session.pyx":363 + /* "ssh/session.pyx":367 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6965,7 +6881,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":364 + /* "ssh/session.pyx":368 * def set_blocking(self, int blocking): * with nogil: * c_ssh.ssh_set_blocking(self._session, blocking) # <<<<<<<<<<<<<< @@ -6975,7 +6891,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj ssh_set_blocking(__pyx_v_self->_session, __pyx_v_blocking); } - /* "ssh/session.pyx":363 + /* "ssh/session.pyx":367 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6994,7 +6910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj } } - /* "ssh/session.pyx":362 + /* "ssh/session.pyx":366 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -7009,7 +6925,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":366 +/* "ssh/session.pyx":370 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7052,11 +6968,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_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, 366, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 370, __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, 366, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 370, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7069,7 +6985,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_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, 366, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 370, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.set_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7090,7 +7006,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counters", 0); - /* "ssh/session.pyx":367 + /* "ssh/session.pyx":371 * * def set_counters(self, scounter, rcounter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -7098,9 +7014,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st * def set_fd_except(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 367, __pyx_L1_error) + __PYX_ERR(0, 371, __pyx_L1_error) - /* "ssh/session.pyx":366 + /* "ssh/session.pyx":370 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7117,7 +7033,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st return __pyx_r; } -/* "ssh/session.pyx":369 +/* "ssh/session.pyx":373 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7144,7 +7060,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_except", 0); - /* "ssh/session.pyx":370 + /* "ssh/session.pyx":374 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7159,7 +7075,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":371 + /* "ssh/session.pyx":375 * def set_fd_except(self): * with nogil: * c_ssh.ssh_set_fd_except(self._session) # <<<<<<<<<<<<<< @@ -7169,7 +7085,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob ssh_set_fd_except(__pyx_v_self->_session); } - /* "ssh/session.pyx":370 + /* "ssh/session.pyx":374 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7188,7 +7104,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob } } - /* "ssh/session.pyx":369 + /* "ssh/session.pyx":373 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7203,7 +7119,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":373 +/* "ssh/session.pyx":377 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7230,7 +7146,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_toread", 0); - /* "ssh/session.pyx":374 + /* "ssh/session.pyx":378 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7245,7 +7161,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":375 + /* "ssh/session.pyx":379 * def set_fd_toread(self): * with nogil: * c_ssh.ssh_set_fd_toread(self._session) # <<<<<<<<<<<<<< @@ -7255,7 +7171,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob ssh_set_fd_toread(__pyx_v_self->_session); } - /* "ssh/session.pyx":374 + /* "ssh/session.pyx":378 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7274,7 +7190,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob } } - /* "ssh/session.pyx":373 + /* "ssh/session.pyx":377 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7289,7 +7205,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":377 +/* "ssh/session.pyx":381 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7316,7 +7232,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_towrite", 0); - /* "ssh/session.pyx":378 + /* "ssh/session.pyx":382 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7331,7 +7247,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":379 + /* "ssh/session.pyx":383 * def set_fd_towrite(self): * with nogil: * c_ssh.ssh_set_fd_towrite(self._session) # <<<<<<<<<<<<<< @@ -7341,7 +7257,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o ssh_set_fd_towrite(__pyx_v_self->_session); } - /* "ssh/session.pyx":378 + /* "ssh/session.pyx":382 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7360,7 +7276,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o } } - /* "ssh/session.pyx":377 + /* "ssh/session.pyx":381 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7375,7 +7291,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":381 +/* "ssh/session.pyx":385 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7402,7 +7318,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("silent_disconnect", 0); - /* "ssh/session.pyx":382 + /* "ssh/session.pyx":386 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7417,7 +7333,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":383 + /* "ssh/session.pyx":387 * def silent_disconnect(self): * with nogil: * c_ssh.ssh_silent_disconnect(self._session) # <<<<<<<<<<<<<< @@ -7427,7 +7343,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py ssh_silent_disconnect(__pyx_v_self->_session); } - /* "ssh/session.pyx":382 + /* "ssh/session.pyx":386 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7446,7 +7362,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py } } - /* "ssh/session.pyx":381 + /* "ssh/session.pyx":385 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7461,7 +7377,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py return __pyx_r; } -/* "ssh/session.pyx":385 +/* "ssh/session.pyx":389 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7495,7 +7411,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_none", 0); - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":391 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7510,16 +7426,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":388 + /* "ssh/session.pyx":392 * 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, 388, __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, 392, __pyx_L4_error) - /* "ssh/session.pyx":389 + /* "ssh/session.pyx":393 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) # <<<<<<<<<<<<<< @@ -7529,7 +7445,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob __pyx_v_rc = ssh_userauth_none(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":391 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7555,7 +7471,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob } } - /* "ssh/session.pyx":390 + /* "ssh/session.pyx":394 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7563,14 +7479,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_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, 390, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __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, 394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":385 + /* "ssh/session.pyx":389 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7589,7 +7505,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":392 +/* "ssh/session.pyx":396 * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7623,7 +7539,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_list", 0); - /* "ssh/session.pyx":394 + /* "ssh/session.pyx":398 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7638,16 +7554,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":395 + /* "ssh/session.pyx":399 * 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, 395, __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, 399, __pyx_L4_error) - /* "ssh/session.pyx":396 + /* "ssh/session.pyx":400 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) # <<<<<<<<<<<<<< @@ -7657,7 +7573,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob __pyx_v_rc = ssh_userauth_list(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":394 + /* "ssh/session.pyx":398 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7683,7 +7599,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob } } - /* "ssh/session.pyx":397 + /* "ssh/session.pyx":401 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7691,14 +7607,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_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, 397, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __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, 401, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":392 + /* "ssh/session.pyx":396 * return handle_auth_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7717,7 +7633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":399 +/* "ssh/session.pyx":403 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7735,7 +7651,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_91userauth_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, 399, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 403, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_pubkey)); /* function exit code */ @@ -7759,7 +7675,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_try_publickey", 0); - /* "ssh/session.pyx":401 + /* "ssh/session.pyx":405 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7774,16 +7690,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct #endif /*try:*/ { - /* "ssh/session.pyx":402 + /* "ssh/session.pyx":406 * 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, 402, __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, 406, __pyx_L4_error) - /* "ssh/session.pyx":403 + /* "ssh/session.pyx":407 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_try_publickey( # <<<<<<<<<<<<<< @@ -7793,7 +7709,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct __pyx_v_rc = ssh_userauth_try_publickey(__pyx_v_self->_session, NULL, __pyx_v_pubkey->_key); } - /* "ssh/session.pyx":401 + /* "ssh/session.pyx":405 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7819,7 +7735,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct } } - /* "ssh/session.pyx":405 + /* "ssh/session.pyx":409 * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7827,14 +7743,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_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, 405, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __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, 409, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":399 + /* "ssh/session.pyx":403 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7853,7 +7769,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct return __pyx_r; } -/* "ssh/session.pyx":407 +/* "ssh/session.pyx":411 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7871,7 +7787,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_93userauth_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, 407, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 411, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_92userauth_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_privkey)); /* function exit code */ @@ -7895,7 +7811,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey", 0); - /* "ssh/session.pyx":409 + /* "ssh/session.pyx":413 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7910,16 +7826,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p #endif /*try:*/ { - /* "ssh/session.pyx":410 + /* "ssh/session.pyx":414 * 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, 410, __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, 414, __pyx_L4_error) - /* "ssh/session.pyx":411 + /* "ssh/session.pyx":415 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey( # <<<<<<<<<<<<<< @@ -7929,7 +7845,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p __pyx_v_rc = ssh_userauth_publickey(__pyx_v_self->_session, NULL, __pyx_v_privkey->_key); } - /* "ssh/session.pyx":409 + /* "ssh/session.pyx":413 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7955,7 +7871,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p } } - /* "ssh/session.pyx":413 + /* "ssh/session.pyx":417 * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7963,14 +7879,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_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, 413, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __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, 417, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":407 + /* "ssh/session.pyx":411 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7989,7 +7905,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p return __pyx_r; } -/* "ssh/session.pyx":417 +/* "ssh/session.pyx":421 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8008,7 +7924,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_95userauth_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, 417, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 421, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_94userauth_agent(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_username)); @@ -8036,19 +7952,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_agent", 0); - /* "ssh/session.pyx":418 + /* "ssh/session.pyx":422 * 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, 418, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":419 + /* "ssh/session.pyx":423 * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8057,12 +7973,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 419, __pyx_L1_error) + __PYX_ERR(0, 423, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":421 + /* "ssh/session.pyx":425 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8077,16 +7993,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":422 + /* "ssh/session.pyx":426 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_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, 422, __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, 426, __pyx_L4_error) - /* "ssh/session.pyx":423 + /* "ssh/session.pyx":427 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) # <<<<<<<<<<<<<< @@ -8096,7 +8012,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o __pyx_v_rc = ssh_userauth_agent(__pyx_v_self->_session, __pyx_v_c_username); } - /* "ssh/session.pyx":421 + /* "ssh/session.pyx":425 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8122,7 +8038,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o } } - /* "ssh/session.pyx":424 + /* "ssh/session.pyx":428 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8130,14 +8046,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o * def userauth_publickey_auto(self, passphrase not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 424, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":417 + /* "ssh/session.pyx":421 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8157,7 +8073,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":426 +/* "ssh/session.pyx":430 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8176,7 +8092,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_97userauth_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, 426, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 430, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_passphrase)); @@ -8204,19 +8120,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_auto", 0); - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":431 * * 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, 427, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":428 + /* "ssh/session.pyx":432 * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *c_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -8225,12 +8141,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 428, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error) __pyx_v_c_passphrase = __pyx_t_2; - /* "ssh/session.pyx":430 + /* "ssh/session.pyx":434 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8245,16 +8161,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc #endif /*try:*/ { - /* "ssh/session.pyx":431 + /* "ssh/session.pyx":435 * 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, 431, __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, 435, __pyx_L4_error) - /* "ssh/session.pyx":432 + /* "ssh/session.pyx":436 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey_auto( # <<<<<<<<<<<<<< @@ -8264,7 +8180,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc __pyx_v_rc = ssh_userauth_publickey_auto(__pyx_v_self->_session, NULL, __pyx_v_c_passphrase); } - /* "ssh/session.pyx":430 + /* "ssh/session.pyx":434 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8290,7 +8206,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc } } - /* "ssh/session.pyx":434 + /* "ssh/session.pyx":438 * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8298,14 +8214,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_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, 434, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __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, 438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":426 + /* "ssh/session.pyx":430 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8325,7 +8241,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc return __pyx_r; } -/* "ssh/session.pyx":436 +/* "ssh/session.pyx":440 * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8368,11 +8284,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_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, 436, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 440, __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, 436, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 440, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8385,17 +8301,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_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, 436, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 440, __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, 436, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 440, __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, 436, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 440, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_98userauth_password(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); @@ -8425,31 +8341,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_password", 0); - /* "ssh/session.pyx":437 + /* "ssh/session.pyx":441 * * 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, 437, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":438 + /* "ssh/session.pyx":442 * 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, 438, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_password = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":439 + /* "ssh/session.pyx":443 * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8458,12 +8374,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 439, __pyx_L1_error) + __PYX_ERR(0, 443, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":440 + /* "ssh/session.pyx":444 * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username * cdef char *c_password = b_password # <<<<<<<<<<<<<< @@ -8472,12 +8388,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_password == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 440, __pyx_L1_error) + __PYX_ERR(0, 444, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __pyx_v_c_password = __pyx_t_2; - /* "ssh/session.pyx":442 + /* "ssh/session.pyx":446 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8492,16 +8408,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":443 + /* "ssh/session.pyx":447 * 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, 443, __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, 447, __pyx_L4_error) - /* "ssh/session.pyx":444 + /* "ssh/session.pyx":448 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_password( # <<<<<<<<<<<<<< @@ -8511,7 +8427,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py __pyx_v_rc = ssh_userauth_password(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_password); } - /* "ssh/session.pyx":442 + /* "ssh/session.pyx":446 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8537,7 +8453,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py } } - /* "ssh/session.pyx":446 + /* "ssh/session.pyx":450 * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8545,14 +8461,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py * 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, 446, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __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, 450, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":436 + /* "ssh/session.pyx":440 * return handle_auth_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8573,7 +8489,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py return __pyx_r; } -/* "ssh/session.pyx":448 +/* "ssh/session.pyx":452 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8616,11 +8532,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_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, 448, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 452, __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, 448, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 452, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8633,17 +8549,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_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, 448, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 452, __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, 448, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 452, __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, 448, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 452, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_100userauth_kbdint(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_submethods); @@ -8673,31 +8589,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint", 0); - /* "ssh/session.pyx":449 + /* "ssh/session.pyx":453 * * 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, 449, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":450 + /* "ssh/session.pyx":454 * 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, 450, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_submethods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":451 + /* "ssh/session.pyx":455 * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8706,12 +8622,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 451, __pyx_L1_error) + __PYX_ERR(0, 455, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":452 + /* "ssh/session.pyx":456 * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods # <<<<<<<<<<<<<< @@ -8720,12 +8636,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_submethods == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 452, __pyx_L1_error) + __PYX_ERR(0, 456, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error) __pyx_v_c_submethods = __pyx_t_2; - /* "ssh/session.pyx":454 + /* "ssh/session.pyx":458 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8740,16 +8656,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":455 + /* "ssh/session.pyx":459 * 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, 455, __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, 459, __pyx_L4_error) - /* "ssh/session.pyx":456 + /* "ssh/session.pyx":460 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint( # <<<<<<<<<<<<<< @@ -8759,7 +8675,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx __pyx_v_rc = ssh_userauth_kbdint(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_submethods); } - /* "ssh/session.pyx":454 + /* "ssh/session.pyx":458 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8785,7 +8701,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx } } - /* "ssh/session.pyx":458 + /* "ssh/session.pyx":462 * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8793,14 +8709,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_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, 458, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __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, 462, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":452 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8821,7 +8737,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":460 +/* "ssh/session.pyx":464 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8855,7 +8771,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getinstruction", 0); - /* "ssh/session.pyx":463 + /* "ssh/session.pyx":467 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8870,16 +8786,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi #endif /*try:*/ { - /* "ssh/session.pyx":464 + /* "ssh/session.pyx":468 * 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, 464, __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, 468, __pyx_L4_error) - /* "ssh/session.pyx":465 + /* "ssh/session.pyx":469 * with nogil: * _check_connected(self._session) * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( # <<<<<<<<<<<<<< @@ -8889,7 +8805,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_v__instruction = ssh_userauth_kbdint_getinstruction(__pyx_v_self->_session); } - /* "ssh/session.pyx":463 + /* "ssh/session.pyx":467 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8915,20 +8831,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi } } - /* "ssh/session.pyx":467 + /* "ssh/session.pyx":471 * _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, 467, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __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, 467, __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, 471, __pyx_L1_error) __pyx_v_b_instruction = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":468 + /* "ssh/session.pyx":472 * self._session) * b_instruction = to_str(_instruction) * return b_instruction # <<<<<<<<<<<<<< @@ -8940,7 +8856,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_r = __pyx_v_b_instruction; goto __pyx_L0; - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":464 * return handle_auth_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8960,7 +8876,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi return __pyx_r; } -/* "ssh/session.pyx":470 +/* "ssh/session.pyx":474 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -8994,7 +8910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getname", 0); - /* "ssh/session.pyx":473 + /* "ssh/session.pyx":477 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9009,16 +8925,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru #endif /*try:*/ { - /* "ssh/session.pyx":474 + /* "ssh/session.pyx":478 * 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, 474, __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, 478, __pyx_L4_error) - /* "ssh/session.pyx":475 + /* "ssh/session.pyx":479 * with nogil: * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) # <<<<<<<<<<<<<< @@ -9028,7 +8944,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_v__name = ssh_userauth_kbdint_getname(__pyx_v_self->_session); } - /* "ssh/session.pyx":473 + /* "ssh/session.pyx":477 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9054,20 +8970,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru } } - /* "ssh/session.pyx":476 + /* "ssh/session.pyx":480 * _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, 476, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __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, 476, __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, 480, __pyx_L1_error) __pyx_v_b_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":477 + /* "ssh/session.pyx":481 * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) * return b_name # <<<<<<<<<<<<<< @@ -9079,7 +8995,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_r = __pyx_v_b_name; goto __pyx_L0; - /* "ssh/session.pyx":470 + /* "ssh/session.pyx":474 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -9099,7 +9015,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru return __pyx_r; } -/* "ssh/session.pyx":479 +/* "ssh/session.pyx":483 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9132,7 +9048,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnprompts", 0); - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":485 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9147,16 +9063,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( #endif /*try:*/ { - /* "ssh/session.pyx":482 + /* "ssh/session.pyx":486 * 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, 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, 486, __pyx_L4_error) - /* "ssh/session.pyx":483 + /* "ssh/session.pyx":487 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) # <<<<<<<<<<<<<< @@ -9166,7 +9082,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( __pyx_v_rc = ssh_userauth_kbdint_getnprompts(__pyx_v_self->_session); } - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":485 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9192,7 +9108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( } } - /* "ssh/session.pyx":484 + /* "ssh/session.pyx":488 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc # <<<<<<<<<<<<<< @@ -9200,13 +9116,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_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, 484, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":479 + /* "ssh/session.pyx":483 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9225,7 +9141,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( return __pyx_r; } -/* "ssh/session.pyx":486 +/* "ssh/session.pyx":490 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9268,11 +9184,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_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, 486, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 490, __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, 486, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 490, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9280,18 +9196,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_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, 486, __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, 490, __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, 486, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __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, 486, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 490, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_echo); /* function exit code */ @@ -9317,17 +9233,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getprompt", 0); - /* "ssh/session.pyx":489 + /* "ssh/session.pyx":493 * 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, 489, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error) __pyx_v_c_echo = __pyx_t_1; - /* "ssh/session.pyx":490 + /* "ssh/session.pyx":494 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9342,16 +9258,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st #endif /*try:*/ { - /* "ssh/session.pyx":491 + /* "ssh/session.pyx":495 * 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, 491, __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, 495, __pyx_L4_error) - /* "ssh/session.pyx":492 + /* "ssh/session.pyx":496 * with nogil: * _check_connected(self._session) * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( # <<<<<<<<<<<<<< @@ -9361,7 +9277,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_v__prompt = ssh_userauth_kbdint_getprompt(__pyx_v_self->_session, __pyx_v_i, __pyx_v_c_echo); } - /* "ssh/session.pyx":490 + /* "ssh/session.pyx":494 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9387,19 +9303,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st } } - /* "ssh/session.pyx":494 + /* "ssh/session.pyx":498 * _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, 494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_b_prompt = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":495 + /* "ssh/session.pyx":499 * self._session, i, c_echo) * b_prompt = _prompt * return b_prompt # <<<<<<<<<<<<<< @@ -9411,7 +9327,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_r = __pyx_v_b_prompt; goto __pyx_L0; - /* "ssh/session.pyx":486 + /* "ssh/session.pyx":490 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9431,7 +9347,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st return __pyx_r; } -/* "ssh/session.pyx":497 +/* "ssh/session.pyx":501 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9464,7 +9380,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnanswers", 0); - /* "ssh/session.pyx":499 + /* "ssh/session.pyx":503 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9479,16 +9395,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( #endif /*try:*/ { - /* "ssh/session.pyx":500 + /* "ssh/session.pyx":504 * 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, 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, 504, __pyx_L4_error) - /* "ssh/session.pyx":501 + /* "ssh/session.pyx":505 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) # <<<<<<<<<<<<<< @@ -9498,7 +9414,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( __pyx_v_rc = ssh_userauth_kbdint_getnanswers(__pyx_v_self->_session); } - /* "ssh/session.pyx":499 + /* "ssh/session.pyx":503 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9524,7 +9440,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( } } - /* "ssh/session.pyx":502 + /* "ssh/session.pyx":506 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc # <<<<<<<<<<<<<< @@ -9532,13 +9448,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_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, 502, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __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":501 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9557,7 +9473,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( return __pyx_r; } -/* "ssh/session.pyx":504 +/* "ssh/session.pyx":508 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9577,7 +9493,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_113userauth_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, 504, __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, 508, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9604,7 +9520,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getanswer", 0); - /* "ssh/session.pyx":507 + /* "ssh/session.pyx":511 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9619,16 +9535,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":508 + /* "ssh/session.pyx":512 * 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, 508, __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, 512, __pyx_L4_error) - /* "ssh/session.pyx":509 + /* "ssh/session.pyx":513 * with nogil: * _check_connected(self._session) * _answer = c_ssh.ssh_userauth_kbdint_getanswer( # <<<<<<<<<<<<<< @@ -9638,7 +9554,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_v__answer = ssh_userauth_kbdint_getanswer(__pyx_v_self->_session, __pyx_v_i); } - /* "ssh/session.pyx":507 + /* "ssh/session.pyx":511 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9664,19 +9580,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st } } - /* "ssh/session.pyx":511 + /* "ssh/session.pyx":515 * _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, 511, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_answer = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":512 + /* "ssh/session.pyx":516 * self._session, i) * b_answer = _answer * return b_answer # <<<<<<<<<<<<<< @@ -9688,7 +9604,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_r = __pyx_v_b_answer; goto __pyx_L0; - /* "ssh/session.pyx":504 + /* "ssh/session.pyx":508 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9708,7 +9624,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st return __pyx_r; } -/* "ssh/session.pyx":514 +/* "ssh/session.pyx":518 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9751,11 +9667,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_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, 514, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 518, __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, 514, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 518, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9763,18 +9679,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_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, 514, __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, 518, __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, 514, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 518, __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, 514, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 518, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_answer); /* function exit code */ @@ -9800,17 +9716,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_setanswer", 0); - /* "ssh/session.pyx":515 + /* "ssh/session.pyx":519 * * 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, 515, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error) __pyx_v_c_answer = __pyx_t_1; - /* "ssh/session.pyx":517 + /* "ssh/session.pyx":521 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9825,16 +9741,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":518 + /* "ssh/session.pyx":522 * 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, 518, __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, 522, __pyx_L4_error) - /* "ssh/session.pyx":519 + /* "ssh/session.pyx":523 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_setanswer( # <<<<<<<<<<<<<< @@ -9844,7 +9760,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_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":517 + /* "ssh/session.pyx":521 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9870,7 +9786,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st } } - /* "ssh/session.pyx":521 + /* "ssh/session.pyx":525 * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9878,14 +9794,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st * def userauth_gssapi(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, 521, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __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, 525, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/session.pyx":514 + /* "ssh/session.pyx":518 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9904,7 +9820,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st return __pyx_r; } -/* "ssh/session.pyx":523 +/* "ssh/session.pyx":527 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9938,7 +9854,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_gssapi", 0); - /* "ssh/session.pyx":525 + /* "ssh/session.pyx":529 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9953,16 +9869,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":526 + /* "ssh/session.pyx":530 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_gssapi(self._session) * 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, 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, 530, __pyx_L4_error) - /* "ssh/session.pyx":527 + /* "ssh/session.pyx":531 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) # <<<<<<<<<<<<<< @@ -9972,7 +9888,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx __pyx_v_rc = ssh_userauth_gssapi(__pyx_v_self->_session); } - /* "ssh/session.pyx":525 + /* "ssh/session.pyx":529 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9998,7 +9914,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx } } - /* "ssh/session.pyx":528 + /* "ssh/session.pyx":532 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10006,14 +9922,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx * def write_knownhost(self): */ __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, 528, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __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, 532, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":523 + /* "ssh/session.pyx":527 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -10032,7 +9948,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":530 +/* "ssh/session.pyx":534 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10065,7 +9981,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_knownhost", 0); - /* "ssh/session.pyx":532 + /* "ssh/session.pyx":536 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10080,7 +9996,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":533 + /* "ssh/session.pyx":537 * cdef int rc * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10090,7 +10006,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx __pyx_v_rc = ssh_write_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":532 + /* "ssh/session.pyx":536 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10109,7 +10025,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx } } - /* "ssh/session.pyx":534 + /* "ssh/session.pyx":538 * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10117,14 +10033,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_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, 534, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __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, 538, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":530 + /* "ssh/session.pyx":534 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10143,7 +10059,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":536 +/* "ssh/session.pyx":540 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10177,7 +10093,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_knownhost", 0); - /* "ssh/session.pyx":539 + /* "ssh/session.pyx":543 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10192,7 +10108,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":540 + /* "ssh/session.pyx":544 * cdef bytes b_known_host * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10202,7 +10118,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_v__known_host = ssh_dump_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":539 + /* "ssh/session.pyx":543 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10221,7 +10137,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ } } - /* "ssh/session.pyx":541 + /* "ssh/session.pyx":545 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10231,7 +10147,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_t_1 = ((__pyx_v__known_host == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":542 + /* "ssh/session.pyx":546 * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: * return # <<<<<<<<<<<<<< @@ -10242,7 +10158,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":541 + /* "ssh/session.pyx":545 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10251,19 +10167,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ */ } - /* "ssh/session.pyx":543 + /* "ssh/session.pyx":547 * 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, 543, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_known_host = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":544 + /* "ssh/session.pyx":548 * return * b_known_host = _known_host * return b_known_host # <<<<<<<<<<<<<< @@ -10275,7 +10191,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = __pyx_v_b_known_host; goto __pyx_L0; - /* "ssh/session.pyx":536 + /* "ssh/session.pyx":540 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10295,7 +10211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":546 +/* "ssh/session.pyx":550 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10329,7 +10245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_clientbanner", 0); - /* "ssh/session.pyx":549 + /* "ssh/session.pyx":553 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10344,7 +10260,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":550 + /* "ssh/session.pyx":554 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) # <<<<<<<<<<<<<< @@ -10354,7 +10270,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_v__banner = ssh_get_clientbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":549 + /* "ssh/session.pyx":553 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10373,7 +10289,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py } } - /* "ssh/session.pyx":551 + /* "ssh/session.pyx":555 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10383,7 +10299,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":552 + /* "ssh/session.pyx":556 * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10394,7 +10310,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":551 + /* "ssh/session.pyx":555 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10403,19 +10319,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py */ } - /* "ssh/session.pyx":553 + /* "ssh/session.pyx":557 * 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, 553, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":554 + /* "ssh/session.pyx":558 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10427,7 +10343,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":546 + /* "ssh/session.pyx":550 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10447,7 +10363,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":556 +/* "ssh/session.pyx":560 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10481,7 +10397,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_serverbanner", 0); - /* "ssh/session.pyx":559 + /* "ssh/session.pyx":563 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10496,7 +10412,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":560 + /* "ssh/session.pyx":564 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) # <<<<<<<<<<<<<< @@ -10506,7 +10422,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_v__banner = ssh_get_serverbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":559 + /* "ssh/session.pyx":563 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10525,7 +10441,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py } } - /* "ssh/session.pyx":561 + /* "ssh/session.pyx":565 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10535,7 +10451,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":562 + /* "ssh/session.pyx":566 * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10546,7 +10462,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":561 + /* "ssh/session.pyx":565 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10555,19 +10471,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py */ } - /* "ssh/session.pyx":563 + /* "ssh/session.pyx":567 * 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, 563, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":564 + /* "ssh/session.pyx":568 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10579,7 +10495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":556 + /* "ssh/session.pyx":560 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10599,7 +10515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":566 +/* "ssh/session.pyx":570 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10633,7 +10549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_kex_algo", 0); - /* "ssh/session.pyx":569 + /* "ssh/session.pyx":573 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10648,7 +10564,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":570 + /* "ssh/session.pyx":574 * cdef bytes algo * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) # <<<<<<<<<<<<<< @@ -10658,7 +10574,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_v__algo = ssh_get_kex_algo(__pyx_v_self->_session); } - /* "ssh/session.pyx":569 + /* "ssh/session.pyx":573 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10677,7 +10593,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob } } - /* "ssh/session.pyx":571 + /* "ssh/session.pyx":575 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10687,7 +10603,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_t_1 = ((__pyx_v__algo == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":572 + /* "ssh/session.pyx":576 * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: * return # <<<<<<<<<<<<<< @@ -10698,7 +10614,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":571 + /* "ssh/session.pyx":575 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10707,19 +10623,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob */ } - /* "ssh/session.pyx":573 + /* "ssh/session.pyx":577 * 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, 573, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_algo = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":574 + /* "ssh/session.pyx":578 * return * algo = _algo * return algo # <<<<<<<<<<<<<< @@ -10731,7 +10647,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = __pyx_v_algo; goto __pyx_L0; - /* "ssh/session.pyx":566 + /* "ssh/session.pyx":570 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10751,7 +10667,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":576 +/* "ssh/session.pyx":580 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10785,7 +10701,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_in", 0); - /* "ssh/session.pyx":579 + /* "ssh/session.pyx":583 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10800,7 +10716,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":580 + /* "ssh/session.pyx":584 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) # <<<<<<<<<<<<<< @@ -10810,7 +10726,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_v__cipher = ssh_get_cipher_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":579 + /* "ssh/session.pyx":583 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10829,7 +10745,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o } } - /* "ssh/session.pyx":581 + /* "ssh/session.pyx":585 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10839,7 +10755,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":582 + /* "ssh/session.pyx":586 * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10850,7 +10766,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":581 + /* "ssh/session.pyx":585 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10859,19 +10775,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o */ } - /* "ssh/session.pyx":583 + /* "ssh/session.pyx":587 * 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, 583, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":584 + /* "ssh/session.pyx":588 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10883,7 +10799,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":576 + /* "ssh/session.pyx":580 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10903,7 +10819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":586 +/* "ssh/session.pyx":590 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -10937,7 +10853,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_out", 0); - /* "ssh/session.pyx":589 + /* "ssh/session.pyx":593 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10952,7 +10868,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":590 + /* "ssh/session.pyx":594 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) # <<<<<<<<<<<<<< @@ -10962,7 +10878,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_v__cipher = ssh_get_cipher_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":589 + /* "ssh/session.pyx":593 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10981,7 +10897,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ } } - /* "ssh/session.pyx":591 + /* "ssh/session.pyx":595 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10991,7 +10907,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":592 + /* "ssh/session.pyx":596 * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -11002,7 +10918,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":591 + /* "ssh/session.pyx":595 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -11011,19 +10927,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ */ } - /* "ssh/session.pyx":593 + /* "ssh/session.pyx":597 * 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, 593, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":594 + /* "ssh/session.pyx":598 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -11035,7 +10951,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":586 + /* "ssh/session.pyx":590 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -11055,7 +10971,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":596 +/* "ssh/session.pyx":600 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11089,7 +11005,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_in", 0); - /* "ssh/session.pyx":599 + /* "ssh/session.pyx":603 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11104,7 +11020,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":600 + /* "ssh/session.pyx":604 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) # <<<<<<<<<<<<<< @@ -11114,7 +11030,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_v__hmac = ssh_get_hmac_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":599 + /* "ssh/session.pyx":603 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11133,7 +11049,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj } } - /* "ssh/session.pyx":601 + /* "ssh/session.pyx":605 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11143,7 +11059,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":602 + /* "ssh/session.pyx":606 * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11154,7 +11070,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":601 + /* "ssh/session.pyx":605 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11163,19 +11079,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj */ } - /* "ssh/session.pyx":603 + /* "ssh/session.pyx":607 * 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, 603, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":604 + /* "ssh/session.pyx":608 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11187,7 +11103,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":596 + /* "ssh/session.pyx":600 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11207,7 +11123,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":606 +/* "ssh/session.pyx":610 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11241,7 +11157,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_out", 0); - /* "ssh/session.pyx":609 + /* "ssh/session.pyx":613 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11256,7 +11172,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":610 + /* "ssh/session.pyx":614 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) # <<<<<<<<<<<<<< @@ -11266,7 +11182,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_v__hmac = ssh_get_hmac_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":609 + /* "ssh/session.pyx":613 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11285,7 +11201,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob } } - /* "ssh/session.pyx":611 + /* "ssh/session.pyx":615 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11295,7 +11211,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":612 + /* "ssh/session.pyx":616 * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11306,7 +11222,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":611 + /* "ssh/session.pyx":615 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11315,19 +11231,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob */ } - /* "ssh/session.pyx":613 + /* "ssh/session.pyx":617 * 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, 613, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":614 + /* "ssh/session.pyx":618 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11339,7 +11255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":606 + /* "ssh/session.pyx":610 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11359,7 +11275,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":616 +/* "ssh/session.pyx":620 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11394,7 +11310,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error", 0); - /* "ssh/session.pyx":619 + /* "ssh/session.pyx":623 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11409,7 +11325,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":620 + /* "ssh/session.pyx":624 * cdef bytes b_error * with nogil: * error = c_ssh.ssh_get_error(self._session) # <<<<<<<<<<<<<< @@ -11419,7 +11335,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_v_error = ssh_get_error(__pyx_v_self->_session); } - /* "ssh/session.pyx":619 + /* "ssh/session.pyx":623 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11438,7 +11354,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 } } - /* "ssh/session.pyx":621 + /* "ssh/session.pyx":625 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11448,7 +11364,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v_error == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":622 + /* "ssh/session.pyx":626 * error = c_ssh.ssh_get_error(self._session) * if error is NULL: * return # <<<<<<<<<<<<<< @@ -11459,7 +11375,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":621 + /* "ssh/session.pyx":625 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11468,19 +11384,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 */ } - /* "ssh/session.pyx":623 + /* "ssh/session.pyx":627 * 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, 623, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_error = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":624 + /* "ssh/session.pyx":628 * return * b_error = error * return to_str(b_error) # <<<<<<<<<<<<<< @@ -11488,14 +11404,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_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, 624, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":616 + /* "ssh/session.pyx":620 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11515,7 +11431,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":626 +/* "ssh/session.pyx":630 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11547,7 +11463,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_code", 0); - /* "ssh/session.pyx":628 + /* "ssh/session.pyx":632 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11562,7 +11478,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":629 + /* "ssh/session.pyx":633 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) # <<<<<<<<<<<<<< @@ -11572,7 +11488,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ __pyx_v_rc = ssh_get_error_code(__pyx_v_self->_session); } - /* "ssh/session.pyx":628 + /* "ssh/session.pyx":632 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11591,7 +11507,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ } } - /* "ssh/session.pyx":630 + /* "ssh/session.pyx":634 * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) * return rc # <<<<<<<<<<<<<< @@ -11599,13 +11515,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_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, 630, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":626 + /* "ssh/session.pyx":630 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11624,7 +11540,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":632 +/* "ssh/session.pyx":636 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -11667,11 +11583,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_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, 632, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 636, __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, 632, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 636, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11679,19 +11595,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_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, 632, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 636, __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, 632, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __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, 632, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 636, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_140scp_new(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_mode, __pyx_v_location); @@ -11719,19 +11635,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scp_new", 0); - /* "ssh/session.pyx":635 + /* "ssh/session.pyx":639 * """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, 635, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_location = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":636 + /* "ssh/session.pyx":640 * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location # <<<<<<<<<<<<<< @@ -11740,12 +11656,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_location == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 636, __pyx_L1_error) + __PYX_ERR(0, 640, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error) __pyx_v_c_location = __pyx_t_2; - /* "ssh/session.pyx":637 + /* "ssh/session.pyx":641 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11760,7 +11676,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":638 + /* "ssh/session.pyx":642 * cdef char *c_location = b_location * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) # <<<<<<<<<<<<<< @@ -11769,7 +11685,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_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":639 + /* "ssh/session.pyx":643 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11779,7 +11695,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((__pyx_v__scp == NULL) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":640 + /* "ssh/session.pyx":644 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11792,7 +11708,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":645 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11801,30 +11717,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":642 + /* "ssh/session.pyx":646 * 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, 641, __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, 645, __pyx_L8_error) - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":645 * 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, 641, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":640 + /* "ssh/session.pyx":644 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11847,7 +11763,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":639 + /* "ssh/session.pyx":643 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11856,7 +11772,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":643 + /* "ssh/session.pyx":647 * 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: # <<<<<<<<<<<<<< @@ -11866,7 +11782,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((ssh_scp_init(__pyx_v__scp) != SSH_OK) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":644 + /* "ssh/session.pyx":648 * 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) # <<<<<<<<<<<<<< @@ -11875,7 +11791,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ ssh_scp_free(__pyx_v__scp); - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":649 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11888,7 +11804,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":650 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11897,29 +11813,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":651 * 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, 646, __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, 650, __pyx_L12_error) - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":650 * 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, 646, __pyx_L12_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_return; } - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":649 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11942,7 +11858,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":643 + /* "ssh/session.pyx":647 * 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: # <<<<<<<<<<<<<< @@ -11952,7 +11868,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":637 + /* "ssh/session.pyx":641 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11985,19 +11901,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":648 + /* "ssh/session.pyx":652 * 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, 648, __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, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":632 + /* "ssh/session.pyx":636 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -12476,7 +12392,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, 218, __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_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) return 0; __pyx_L1_error:; diff --git a/ssh/session.pyx b/ssh/session.pyx index ca5cc9a3..97c6e131 100644 --- a/ssh/session.pyx +++ b/ssh/session.pyx @@ -141,11 +141,15 @@ cdef class Session: return handle_error_codes(rc, self._session) def disconnect(self): - """Disconnect session and close socket""" - if not c_ssh.ssh_is_connected(self._session): - return - with nogil: - c_ssh.ssh_disconnect(self._session) + """No-op. Handled by object de-allocation.""" + # Due to bug in libssh that segfaults if session + # is disconnected before freeing channels spawned + # by that session - even if channels are closed. + pass + # if not c_ssh.ssh_is_connected(self._session): + # return + # with nogil: + # c_ssh.ssh_disconnect(self._session) def connector_new(self): cdef c_ssh.ssh_connector _connector