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
commit04842bd697e4b3a8b5e9668f4fa6d3016e23e609 (patch)
tree10cec8fe5bdc63d6daf08ac6bc87b44dc44ab87d /Python/codecs.c
parentb9c284bcd8ba48686ceb806693ce1e4bfad7c149 (diff)
parentcc0f5885dbb9226e53e449d6623df53fa75b66ce (diff)
downloadcpython-04842bd697e4b3a8b5e9668f4fa6d3016e23e609.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);