mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-132250: Clear error in lsprof callback when method descriptor raises an excep… (#132251)
This commit is contained in:
parent
efd8aca62c
commit
ab64130b57
3 changed files with 10 additions and 0 deletions
|
@ -671,6 +671,7 @@ PyObject* get_cfunc_from_callable(PyObject* callable, PyObject* self_arg, PyObje
|
|||
PyObject *meth = Py_TYPE(callable)->tp_descr_get(
|
||||
callable, self_arg, (PyObject*)Py_TYPE(self_arg));
|
||||
if (meth == NULL) {
|
||||
PyErr_Clear();
|
||||
return NULL;
|
||||
}
|
||||
if (PyCFunction_Check(meth)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue