Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().

This commit is contained in:
Guido van Rossum 1998-05-28 19:24:35 +00:00
parent 41e825a8f4
commit 08570decb7
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}