diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-12-15 17:51:05 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-12-15 17:51:05 (GMT) |
commit | 9272279afdd5f102f0f1d4022da61265c5a46d04 (patch) | |
tree | cd57cf8ec8bd226b324fa3406f3e6fbf1722d1c4 /Python/ceval.c | |
parent | 1a714750cfdd3e71a1b43ff0e34305038713e356 (diff) | |
download | cpython-9272279afdd5f102f0f1d4022da61265c5a46d04.zip cpython-9272279afdd5f102f0f1d4022da61265c5a46d04.tar.gz cpython-9272279afdd5f102f0f1d4022da61265c5a46d04.tar.bz2 |
use error label instead of breaking eval loop (closes #16693)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 807fa7d..32c203e 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2162,9 +2162,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) else { v = PyObject_GetItem(locals, name); if (v == NULL && PyErr_Occurred()) { - if (!PyErr_ExceptionMatches( - PyExc_KeyError)) - break; + if (!PyErr_ExceptionMatches(PyExc_KeyError)) + goto error; PyErr_Clear(); } } |