diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-08-23 18:13:39 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-08-23 18:13:39 (GMT) |
commit | fbfe0936078e16829f36a6e61b511c123fd17b17 (patch) | |
tree | 2d1821390b8245f9d45858c7703275cfa96c29c4 /Python/compile.c | |
parent | 811c4e0b7cb1a3b43cda8dab0b1587983b44c58d (diff) | |
download | cpython-fbfe0936078e16829f36a6e61b511c123fd17b17.zip cpython-fbfe0936078e16829f36a6e61b511c123fd17b17.tar.gz cpython-fbfe0936078e16829f36a6e61b511c123fd17b17.tar.bz2 |
Check for exceptions set by PyDict_GetItem().
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 678a4de..464c953 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -959,6 +959,8 @@ compiler_add_o(struct compiler *c, PyObject *dict, PyObject *o) v = PyDict_GetItem(dict, t); if (!v) { + if (PyErr_Occurred()) + return -1; arg = PyDict_Size(dict); v = PyInt_FromLong(arg); if (!v) { |