From fbfe0936078e16829f36a6e61b511c123fd17b17 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 23 Aug 2006 18:13:39 +0000 Subject: Check for exceptions set by PyDict_GetItem(). --- Python/compile.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v0.12