diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-07-11 16:56:38 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-07-11 16:56:38 (GMT) |
commit | 76c81eecfa0b2a8a8a62a593ac2bd8c3e6c79acd (patch) | |
tree | 06691a87857a4faecb927df1510abfb9b1da9e18 /Python | |
parent | 7b4c8e485c6ec3cc4605b6e1a24bd3a324f1c0a5 (diff) | |
download | cpython-76c81eecfa0b2a8a8a62a593ac2bd8c3e6c79acd.zip cpython-76c81eecfa0b2a8a8a62a593ac2bd8c3e6c79acd.tar.gz cpython-76c81eecfa0b2a8a8a62a593ac2bd8c3e6c79acd.tar.bz2 |
Don't stomp on an exception set by PyCell_Get()
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 7f7d37e..61db642 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1734,6 +1734,10 @@ eval_frame(PyFrameObject *f) x = freevars[oparg]; w = PyCell_Get(x); if (w == NULL) { + err = -1; + /* Don't stomp existing exception */ + if (PyErr_Occurred()) + break; if (oparg < f->f_ncells) { v = PyTuple_GetItem(co->co_cellvars, oparg); @@ -1750,7 +1754,6 @@ eval_frame(PyFrameObject *f) UNBOUNDFREE_ERROR_MSG, v); } - err = -1; break; } PUSH(w); |