pyapi CHANGE catch not catched errors when creating sessions
When the session was successfully created but an (not really important)
error/exception was raised, just print it and continue with the created
session.
@@ -159,7 +159,6 @@ auth_interactive_pyclb(const char *auth_name, const char *instruction, const cha
}
return password;
-
}
char *
@@ -277,6 +276,10 @@ ncSessionInit(ncSessionObject *self, PyObject *args, PyObject *kwds)
return -1;
}
+ if (PyErr_Occurred()) {
+ PyErr_PrintEx(0);
+ }
+
/* get the internally created context for this session */
self->ctx = nc_session_get_ctx(session);
