Skip to content

Commit 87cceeb

Browse files
committed
Fix flake8 errors.
1 parent b9dd931 commit 87cceeb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ssh2/c_ssh2.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ cdef extern from "libssh2.h" nogil:
6666
LIBSSH2_FLAG_SIGPIPE
6767
LIBSSH2_FLAG_COMPRESS
6868

69-
# ctypedef LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC "LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC"
7069
# ctypedef libssh2_uint64_t libssh2_struct_stat_size
7170
ctypedef struct libssh2_struct_stat:
7271
dev_t st_dev

ssh2/session.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cdef void kbd_callback(const char *name, int name_len,
7575
c_ssh2.LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
7676
void **abstract):
7777
py_sess = (<Session>c_dereference(abstract))
78-
if py_sess._kbd_callback==None:
78+
if py_sess._kbd_callback is None:
7979
return
8080
cdef bytes b_password = to_bytes(py_sess._kbd_callback())
8181
cdef char *_password = b_password
@@ -560,8 +560,10 @@ cdef class Session:
560560
cdef int rc
561561
cdef bytes b_username = to_bytes(username)
562562
cdef const char *_username = b_username
563+
563564
def passwd():
564565
return(password)
566+
565567
self._kbd_callback = passwd
566568
rc = c_ssh2.libssh2_userauth_keyboard_interactive(
567569
self._session, _username, &kbd_callback)

0 commit comments

Comments
 (0)