From: Martin v. Löwis Date: Thu, 26 Sep 2002 16:01:24 +0000 (+0000) Subject: Add encoding name in LookupError. Fixes #615013. Will backport to 2.2. X-Git-Tag: v2.3c1~3976 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb42b026dbfd8583279e685f693b0483e06e5d29;p=thirdparty%2FPython%2Fcpython.git Add encoding name in LookupError. Fixes #615013. Will backport to 2.2. --- diff --git a/Python/codecs.c b/Python/codecs.c index 12dfe28f847b..1424bb5b7094 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -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; }