Commit 617c1b01 authored by Guido van Rossum's avatar Guido van Rossum

Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().

parent 08570dec
......@@ -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;
......
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