Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.
This commit is contained in:
parent
6d817ad43d
commit
eb42b026db
|
@ -197,8 +197,8 @@ PyObject *_PyCodec_Lookup(const char *encoding)
|
|||
}
|
||||
if (i == len) {
|
||||
/* XXX Perhaps we should cache misses too ? */
|
||||
PyErr_SetString(PyExc_LookupError,
|
||||
"unknown encoding");
|
||||
PyErr_Format(PyExc_LookupError,
|
||||
"unknown encoding: %s", encoding);
|
||||
goto onError;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue