Mercurial > cpython-lru_cache-weakref
diff Python/exceptions.c @ 25325:6b62ab8485eb legacy-trunk
Two more cases of switch(PySequence_Size()) without checking for case -1.
(Same problem as last checkin for SF bug 610610)
Need to clear the error and proceed.
Backport candidate
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Wed, 18 Sep 2002 22:37:17 +0000 |
| parents | 14ad560f4a97 |
| children | 910fa739f4a4 |
line wrap: on
line diff
--- a/Python/exceptions.c Wed Sep 18 22:17:57 2002 +0000 +++ b/Python/exceptions.c Wed Sep 18 22:37:17 2002 +0000 @@ -419,6 +419,9 @@ case 1: code = PySequence_GetItem(args, 0); break; + case -1: + PyErr_Clear(); + /* Fall through */ default: Py_INCREF(args); code = args; @@ -522,6 +525,10 @@ goto finally; } break; + + case -1: + PyErr_Clear(); + break; } Py_INCREF(Py_None);
