From 2d962f13c554681ded71e665a429eb359742531f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 21 Jun 2009 13:54:20 +0200 Subject: python/cache.cc: Give more information on TypeErrors in CacheMapOp --- python/cache.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/cache.cc b/python/cache.cc index 7e75ccab..35c8b78f 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -223,7 +223,9 @@ static PyObject *CacheMapOp(PyObject *Self,PyObject *Arg) if (PyString_Check(Arg) == 0) { - PyErr_SetNone(PyExc_TypeError); + PyObject *repr = PyObject_Repr(Arg); + PyErr_SetObject(PyExc_TypeError, repr); + Py_DECREF(repr); return 0; } -- cgit v1.2.3