gh-135161: Remove redundant NULL check for 'exc' after dereference in ceval.c (#135162)
This commit is contained in:
parent
9258f3da91
commit
8919cb4ad9
@ -3190,7 +3190,7 @@ _PyEval_FormatKwargsError(PyThreadState *tstate, PyObject *func, PyObject *kwarg
|
||||
else if (_PyErr_ExceptionMatches(tstate, PyExc_KeyError)) {
|
||||
PyObject *exc = _PyErr_GetRaisedException(tstate);
|
||||
PyObject *args = PyException_GetArgs(exc);
|
||||
if (exc && PyTuple_Check(args) && PyTuple_GET_SIZE(args) == 1) {
|
||||
if (PyTuple_Check(args) && PyTuple_GET_SIZE(args) == 1) {
|
||||
_PyErr_Clear(tstate);
|
||||
PyObject *funcstr = _PyObject_FunctionStr(func);
|
||||
if (funcstr != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user