Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.

This commit is contained in:
Martin v. Löwis 2002-09-26 16:01:24 +00:00
parent 6d817ad43d
commit eb42b026db
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}