summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-08-23 18:13:39 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2006-08-23 18:13:39 (GMT)
commitfbfe0936078e16829f36a6e61b511c123fd17b17 (patch)
tree2d1821390b8245f9d45858c7703275cfa96c29c4 /Python
parent811c4e0b7cb1a3b43cda8dab0b1587983b44c58d (diff)
downloadcpython-fbfe0936078e16829f36a6e61b511c123fd17b17.zip
cpython-fbfe0936078e16829f36a6e61b511c123fd17b17.tar.gz
cpython-fbfe0936078e16829f36a6e61b511c123fd17b17.tar.bz2
Check for exceptions set by PyDict_GetItem().
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
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) {