1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-08-04 12:21:57 +03:00

Print any exception that occurs in authentication callback

If an exception occurs in the python callback for openAuth()
the stack trace isn't seen by the apps, since this code is
called from libvirt context. To aid diagnostics, print the
error to stderr at least

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2012-09-10 16:44:40 +01:00
parent d1b4ab2ae8
commit 7984eccd24

View File

@ -1776,8 +1776,10 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
PyErr_Clear();
pyret = PyEval_CallObject(pycb, list);
if (PyErr_Occurred())
if (PyErr_Occurred()) {
PyErr_Print();
goto cleanup;
}
ret = PyLong_AsLong(pyret);
if (ret == 0) {