summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/python-wrapper.swig')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index 35aa7514e4c..e147e653f4c 100644
--- a/lldb/scripts/Python/python-wrapper.swig
+++ b/lldb/scripts/Python/python-wrapper.swig
@@ -523,6 +523,11 @@ LLDBSwigPython_UpdateSynthProviderInstance
// other synth provider calls are mandatory, so we want to fail in a very obvious way if they are missing!
PyObject* pmeth = PyObject_GetAttrString(implementor, callee_name);
+ if (PyErr_Occurred())
+ {
+ PyErr_Clear();
+ }
+
if (pmeth == NULL || pmeth == Py_None)
{
Py_XDECREF(pmeth);
@@ -531,10 +536,20 @@ LLDBSwigPython_UpdateSynthProviderInstance
if (PyCallable_Check(pmeth) == 0)
{
+ if (PyErr_Occurred())
+ {
+ PyErr_Clear();
+ }
+
Py_XDECREF(pmeth);
return;
}
+ if (PyErr_Occurred())
+ {
+ PyErr_Clear();
+ }
+
Py_XDECREF(pmeth);
// right now we know this function exists and is callable..
OpenPOWER on IntegriCloud