summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-28 19:50:02 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-28 19:50:02 (GMT)
commit617c1b0116891c3cbb6b10865e86d48e93fefdf0 (patch)
treed4a7f84d0f93d0ca6fb88ecddbae27c11ba0be10 /Objects/classobject.c
parent08570decb7862d6f7347e92df86c1f96ae200036 (diff)
downloadcpython-617c1b0116891c3cbb6b10865e86d48e93fefdf0.zip
cpython-617c1b0116891c3cbb6b10865e86d48e93fefdf0.tar.gz
cpython-617c1b0116891c3cbb6b10865e86d48e93fefdf0.tar.bz2
Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c2
1 files changed, 1 insertions, 1 deletions
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;