summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-18 22:31:12 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-18 22:31:12 +0100
commitf0ecdd2ab9dabd61540d65bd638d201f45c2b558 (patch)
tree476d6c662f87e834b74f055dd560112fe25ffef9 /Python/codecs.c
parentaa5c5c60f1e077b6d68804adeb8b05638abb3dd7 (diff)
parent1b468af7be7a2f0af7730c64402a38cc11413f51 (diff)
downloadcpython-git-f0ecdd2ab9dabd61540d65bd638d201f45c2b558.tar.gz
Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry.
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 9b0c4b2f44..607feea81c 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -1041,15 +1041,6 @@ static int _PyCodecRegistry_Init(void)
mod = PyImport_ImportModuleNoBlock("encodings");
if (mod == NULL) {
- if (PyErr_ExceptionMatches(PyExc_ImportError)) {
- /* Ignore ImportErrors... this is done so that
- distributions can disable the encodings package. Note
- that other errors are not masked, e.g. SystemErrors
- raised to inform the user of an error in the Python
- configuration are still reported back to the user. */
- PyErr_Clear();
- return 0;
- }
return -1;
}
Py_DECREF(mod);