diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2002-09-26 16:01:24 +0000 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2002-09-26 16:01:24 +0000 |
| commit | b610c6fb2aef798bbd6c580fe83b204475bc5ec0 (patch) | |
| tree | 6b087347b15e91002aa5e24dd63589e429659606 /Python/codecs.c | |
| parent | 38d1f4f360f87fb47cf0c266d4d69e2ef837234c (diff) | |
| download | cpython-b610c6fb2aef798bbd6c580fe83b204475bc5ec0.tar.gz | |
Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.
Diffstat (limited to 'Python/codecs.c')
| -rw-r--r-- | Python/codecs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index 12dfe28f84..1424bb5b70 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; } |
