summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index b35b5dd..502bd82 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1158,7 +1158,7 @@ PySequence_Contains(w, v) /* v in w */
for (i = 0; ; i++) {
x = (*sq->sq_item)(w, i);
if (x == NULL) {
- if (PyErr_Occurred() == PyExc_IndexError) {
+ if (PyErr_ExceptionMatches(PyExc_IndexError)) {
PyErr_Clear();
break;
}