Remove dead code (unreachable)

This commit is contained in:
Raymond Hettinger 2015-08-15 15:09:30 -07:00
parent 1cadf769b3
commit 98958fedb6
1 changed files with 2 additions and 5 deletions

View File

@ -940,12 +940,9 @@ cycle_next(cycleobject *lz)
}
return item;
}
if (PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_StopIteration))
PyErr_Clear();
else
/* Note: StopIteration is already cleared by PyIter_Next() */
if (PyErr_Occurred())
return NULL;
}
if (PyList_Size(lz->saved) == 0)
return NULL;
it = PyObject_GetIter(lz->saved);