summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/cache.cc4
1 files changed, 3 insertions, 1 deletions
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;
}