diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index fc4f718de2..b359fb0798 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4620,7 +4620,10 @@ void PyEval_SetProfile(Py_tracefunc func, PyObject *arg) { PyThreadState *tstate = _PyThreadState_GET(); - (void)_PyEval_SetProfile(tstate, func, arg); + if (_PyEval_SetProfile(tstate, func, arg) < 0) { + /* Log PySys_Audit() error */ + _PyErr_WriteUnraisableMsg("in PyEval_SetProfile", NULL); + } } int @@ -4661,7 +4664,10 @@ void PyEval_SetTrace(Py_tracefunc func, PyObject *arg) { PyThreadState *tstate = _PyThreadState_GET(); - (void)_PyEval_SetTrace(tstate, func, arg); + if (_PyEval_SetTrace(tstate, func, arg) < 0) { + /* Log PySys_Audit() error */ + _PyErr_WriteUnraisableMsg("in PyEval_SetTrace", NULL); + } } |