[Python-checkins] python/dist/src/Objects funcobject.c, 2.55.2.3, 2.55.2.4

jhylton@users.sourceforge.net jhylton at users.sourceforge.net
Fri Oct 14 22:09:50 CEST 2005


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7110/Objects

Modified Files:
      Tag: ast-branch
	funcobject.c 
Log Message:
Make error message for system error more descriptive.


Index: funcobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v
retrieving revision 2.55.2.3
retrieving revision 2.55.2.4
diff -u -d -r2.55.2.3 -r2.55.2.4
--- funcobject.c	7 Jan 2005 07:04:01 -0000	2.55.2.3
+++ funcobject.c	14 Oct 2005 20:09:47 -0000	2.55.2.4
@@ -144,7 +144,9 @@
 		Py_XINCREF(closure);
 	}
 	else {
-		PyErr_SetString(PyExc_SystemError, "non-tuple closure");
+		PyErr_Format(PyExc_SystemError, 
+			     "expected tuple for closure, got '%.100s'",
+			     closure->ob_type->tp_name);
 		return -1;
 	}
 	Py_XDECREF(((PyFunctionObject *) op) -> func_closure);



More information about the Python-checkins mailing list