Skip to content

Commit 50a37dd

Browse files
committed
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.
1 parent 4bb7bbb commit 50a37dd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

python/session.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ auth_interactive_pyclb(const char *auth_name, const char *instruction, const cha
159159
}
160160

161161
return password;
162-
163162
}
164163

165164
char *
@@ -277,6 +276,10 @@ ncSessionInit(ncSessionObject *self, PyObject *args, PyObject *kwds)
277276
return -1;
278277
}
279278

279+
if (PyErr_Occurred()) {
280+
PyErr_PrintEx(0);
281+
}
282+
280283
/* get the internally created context for this session */
281284
self->ctx = nc_session_get_ctx(session);
282285

0 commit comments

Comments
 (0)