summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-09-26 16:04:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-09-26 16:04:31 (GMT)
commit7433ef5cee177a48eeb7a7f6af4c8f6e7f9feb9a (patch)
tree9fa64e6054a1470655cdf91a05cd6fea687c7412 /Python
parentc2de2056593bf159ab21f0d0d6acafdee6cd2cf1 (diff)
downloadcpython-7433ef5cee177a48eeb7a7f6af4c8f6e7f9feb9a.zip
cpython-7433ef5cee177a48eeb7a7f6af4c8f6e7f9feb9a.tar.gz
cpython-7433ef5cee177a48eeb7a7f6af4c8f6e7f9feb9a.tar.bz2
Add encoding in LookupError. Fixes #615013.
Diffstat (limited to 'Python')
-rw-r--r--Python/codecs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 3324b80..b3778cf 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;
}