summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-09-10 16:44:40 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-09-11 12:16:17 +0100
commit7984eccd246ff74d3992bd610cc11e0d2cb68994 (patch)
tree1634febc6274281b12b448527e7773386fcacf13
parentd1b4ab2ae843c3989885e043cf065a9288271cf2 (diff)
downloadlibvirt-python-split-7984eccd246ff74d3992bd610cc11e0d2cb68994.tar.gz
libvirt-python-split-7984eccd246ff74d3992bd610cc11e0d2cb68994.tar.xz
libvirt-python-split-7984eccd246ff74d3992bd610cc11e0d2cb68994.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>
-rw-r--r--libvirt-override.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index c51dd3f..768144a 100644
--- a/libvirt-override.c
+++ b/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) {