summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-09-26 16:01:24 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-09-26 16:01:24 (GMT)
commiteb42b026dbfd8583279e685f693b0483e06e5d29 (patch)
treed25d5a0015bbdf5f7e4cb630fe18145fd40181c9 /Python
parent6d817ad43d9e7ef4acc51abfd8700309644ebb96 (diff)
downloadcpython-eb42b026dbfd8583279e685f693b0483e06e5d29.zip
cpython-eb42b026dbfd8583279e685f693b0483e06e5d29.tar.gz
cpython-eb42b026dbfd8583279e685f693b0483e06e5d29.tar.bz2
Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.
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 12dfe28..1424bb5 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;
}