diff Python/codecs.c @ 74512:f55529aa023d

Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry.
author Antoine Pitrou <solipsis@pitrou.net>
date Wed, 18 Jan 2012 22:31:12 +0100
parents 6407294eb3c6 46b245f03f54
children 1439e2d1f490
line wrap: on
line diff
--- a/Python/codecs.c	Wed Jan 18 21:45:15 2012 +0100
+++ b/Python/codecs.c	Wed Jan 18 22:31:12 2012 +0100
@@ -1041,15 +1041,6 @@
 
     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);