diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-21 13:54:20 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-21 13:54:20 +0200 |
| commit | 2d962f13c554681ded71e665a429eb359742531f (patch) | |
| tree | d812ddeb061355b76b2e0382a882e0825d227358 /python/cache.cc | |
| parent | cef5268fc12c6a4b4b8aa2b58a09494b1944e28a (diff) | |
| download | python-apt-2d962f13c554681ded71e665a429eb359742531f.tar.gz | |
python/cache.cc: Give more information on TypeErrors in CacheMapOp
Diffstat (limited to 'python/cache.cc')
| -rw-r--r-- | python/cache.cc | 4 |
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; } |
