mirror of
https://github.com/python/cpython.git
synced 2025-10-28 09:10:36 +00:00
Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.
This commit is contained in:
parent
6d817ad43d
commit
eb42b026db
1 changed files with 2 additions and 2 deletions
|
|
@ -197,8 +197,8 @@ PyObject *_PyCodec_Lookup(const char *encoding)
|
||||||
}
|
}
|
||||||
if (i == len) {
|
if (i == len) {
|
||||||
/* XXX Perhaps we should cache misses too ? */
|
/* XXX Perhaps we should cache misses too ? */
|
||||||
PyErr_SetString(PyExc_LookupError,
|
PyErr_Format(PyExc_LookupError,
|
||||||
"unknown encoding");
|
"unknown encoding: %s", encoding);
|
||||||
goto onError;
|
goto onError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue