summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
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 678a4deee9..464c953b22 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) {