diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-09-10 16:44:40 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2012-09-11 12:16:17 +0100 |
commit | 01573bdf4f462a0a7e7a29a37ddfcc7ecff3c049 (patch) | |
tree | 85d712b0a768dacf29662bd987723131e1f9c27b /python | |
parent | Fix crash passing an empty list to python openAuth() API (diff) | |
download | libvirt-01573bdf4f462a0a7e7a29a37ddfcc7ecff3c049.tar.gz libvirt-01573bdf4f462a0a7e7a29a37ddfcc7ecff3c049.tar.bz2 libvirt-01573bdf4f462a0a7e7a29a37ddfcc7ecff3c049.zip |
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>
Diffstat (limited to 'python')
-rw-r--r-- | python/libvirt-override.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/libvirt-override.c b/python/libvirt-override.c index c51dd3fac..768144a00 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -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) { |