summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-08-11 19:20:44 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-08-11 19:20:44 +0000
commita365f296e61e030175eb48b5dd1aaff36bade63e (patch)
tree44866c21090c98335d18c7f9114a41d5d96b0bee /lldb/scripts/Python/python-wrapper.swig
parent0a76c28a87cd7c5bc1f474174fb55acb84b3b3e6 (diff)
downloadbcm5719-llvm-a365f296e61e030175eb48b5dd1aaff36bade63e.tar.gz
bcm5719-llvm-a365f296e61e030175eb48b5dd1aaff36bade63e.zip
Fixed an issue where LLDB was complaining about the lack of 'update' in a synthetic provider, despite it being optional
llvm-svn: 137330
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