From: Martin v. Löwis Date: Thu, 26 Sep 2002 16:04:31 +0000 (+0000) Subject: Add encoding in LookupError. Fixes #615013. X-Git-Tag: v2.2.2b1~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7433ef5cee177a48eeb7a7f6af4c8f6e7f9feb9a;p=thirdparty%2FPython%2Fcpython.git Add encoding in LookupError. Fixes #615013. --- diff --git a/Python/codecs.c b/Python/codecs.c index 3324b806fc9b..b3778cf23417 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; }