[Python-checkins] r46523 - python/trunk/Python/errors.c

georg.brandl python-checkins at python.org
Mon May 29 16:13:22 CEST 2006


Author: georg.brandl
Date: Mon May 29 16:13:21 2006
New Revision: 46523

Modified:
   python/trunk/Python/errors.c
Log:
Fix #1494605.



Modified: python/trunk/Python/errors.c
==============================================================================
--- python/trunk/Python/errors.c	(original)
+++ python/trunk/Python/errors.c	Mon May 29 16:13:21 2006
@@ -728,7 +728,8 @@
 
 		tmp = PyErr_ProgramText(filename, lineno);
 		if (tmp) {
-			PyObject_SetAttrString(v, "text", tmp);
+			if (PyObject_SetAttrString(v, "text", tmp))
+				PyErr_Clear();
 			Py_DECREF(tmp);
 		}
 	}


More information about the Python-checkins mailing list