mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
This commit is contained in:
parent
08570decb7
commit
617c1b0116
1 changed files with 1 additions and 1 deletions
|
|
@ -1114,7 +1114,7 @@ halfbinop(v, w, opname, r_result, thisfunc, swapped)
|
|||
func = PyObject_GetAttrString(v, opname);
|
||||
if (func == NULL) {
|
||||
Py_XDECREF(coerced);
|
||||
if (PyErr_Occurred() != PyExc_AttributeError)
|
||||
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
|
||||
return -1;
|
||||
PyErr_Clear();
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue