diff Python/compile.c @ 39637:472ca7006f70

Check for exceptions set by PyDict_GetItem().
author Jeremy Hylton <jeremy@alum.mit.edu>
date Wed, 23 Aug 2006 18:13:39 +0000
parents 3674f20ac781
children eb2f70fdbf32
line wrap: on
line diff
--- a/Python/compile.c	Tue Aug 22 15:45:46 2006 +0000
+++ b/Python/compile.c	Wed Aug 23 18:13:39 2006 +0000
@@ -959,6 +959,8 @@
 
 	v = PyDict_GetItem(dict, t);
 	if (!v) {
+                if (PyErr_Occurred())
+                        return -1;
 		arg = PyDict_Size(dict);
 		v = PyInt_FromLong(arg);
 		if (!v) {