diff options
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 60db703..67ea388 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2363,6 +2363,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) /* Slow-path if globals or builtins is not a dict */ v = PyObject_GetItem(f->f_globals, name); if (v == NULL) { + if (!PyErr_ExceptionMatches(PyExc_KeyError)) + goto error; + PyErr_Clear(); + v = PyObject_GetItem(f->f_builtins, name); if (v == NULL) { if (PyErr_ExceptionMatches(PyExc_KeyError)) |