Commit 1de2a79a authored by Thomas Wouters's avatar Thomas Wouters

Call PyErr_Clear() to clear the AttributeError raised by GetAttr.

parent aff1284e
...@@ -1460,6 +1460,7 @@ instance_inplace_pow(PyObject *v, PyObject *w, PyObject *z) ...@@ -1460,6 +1460,7 @@ instance_inplace_pow(PyObject *v, PyObject *w, PyObject *z)
if (func == NULL) { if (func == NULL) {
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) if (!PyErr_ExceptionMatches(PyExc_AttributeError))
return NULL; return NULL;
PyErr_Clear();
return instance_pow(v, w, z); return instance_pow(v, w, z);
} }
args = Py_BuildValue("(OO)", w, z); args = Py_BuildValue("(OO)", w, z);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment