Mercurial > cpython-lru_cache-weakref
diff Python/codecs.c @ 74511:46b245f03f54 3.2
Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Wed, 18 Jan 2012 22:30:21 +0100 |
| parents | 92d02de91cc9 |
| children | 74d65c746f63 f55529aa023d |
line wrap: on
line diff
--- a/Python/codecs.c Wed Jan 18 21:23:13 2012 +0100 +++ b/Python/codecs.c Wed Jan 18 22:30:21 2012 +0100 @@ -1067,15 +1067,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);
