mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-01 00:21:59 +03:00
libvirt-override: Reset exception if the error is ignored
In virConnectCredCallbackWrapper() we ignore the error case of libvirt_charPtrUnwrap() function so we should also reset the exception. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@ -1918,8 +1918,10 @@ virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
|
||||
char *result = NULL;
|
||||
pycreditem = PyTuple_GetItem(pycred, i);
|
||||
pyresult = PyList_GetItem(pycreditem, 4);
|
||||
if (pyresult != Py_None)
|
||||
if (pyresult != Py_None) {
|
||||
libvirt_charPtrUnwrap(pyresult, &result);
|
||||
PyErr_Clear();
|
||||
}
|
||||
if (result != NULL) {
|
||||
cred[i].result = result;
|
||||
cred[i].resultlen = strlen(result);
|
||||
|
Reference in New Issue
Block a user