From 617c1b0116891c3cbb6b10865e86d48e93fefdf0 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 28 May 1998 19:50:02 +0000 Subject: Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred(). --- Objects/classobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/classobject.c b/Objects/classobject.c index 27a82f9..083759cd 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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; -- cgit v0.12