Permalink
Browse files

Add a new message if an error occurs in userauth_list method

  • Loading branch information...
1 parent d1675e3 commit ac79e83712d8a4731a35d545b418f046c5ca64cf @ohe ohe committed Jul 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/session.c
View
@@ -179,8 +179,8 @@ PYLIBSSH2_Session_userauth_list(PYLIBSSH2_SESSION *self, PyObject *args)
auth_list=libssh2_userauth_list(self->session, username, username_len);
if (auth_list == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PYLIBSSH2_Error, "Authentication methods listing failed.");
+ return NULL;
}
return PyString_FromString(auth_list);

0 comments on commit ac79e83

Please sign in to comment.