Commit 580ceedd authored by Walter Dörwald's avatar Walter Dörwald

Mention type in the exception message.

parent e6d3904c
...@@ -3528,8 +3528,9 @@ static PyObject *charmapencode_lookup(Py_UNICODE c, PyObject *mapping) ...@@ -3528,8 +3528,9 @@ static PyObject *charmapencode_lookup(Py_UNICODE c, PyObject *mapping)
return x; return x;
else { else {
/* wrong return value */ /* wrong return value */
PyErr_SetString(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"character mapping must return integer, None or str"); "character mapping must return integer, None or str8, not %.400s",
x->ob_type->tp_name);
Py_DECREF(x); Py_DECREF(x);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment