From 08570decb7862d6f7347e92df86c1f96ae200036 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 28 May 1998 19:24:35 +0000 Subject: Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred(). --- Objects/abstract.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12