Mercurial > cpython-lru_cache-weakref
diff Python/_warnings.c @ 61776:3271af035d01 3.1
Recorded merge of revisions 81364 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81364 | victor.stinner | 2010-05-19 22:40:50 +0200 (mer., 19 mai 2010) | 3 lines
Issue #8766: Initialize _warnings module before importing the first module.
Fix a crash if an empty directory called "encodings" exists in sys.path.
........
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Thu, 20 May 2010 21:00:34 +0000 |
| parents | f197407bdba2 |
| children | fa830371c724 |
line wrap: on
line diff
--- a/Python/_warnings.c Thu May 20 10:41:41 2010 +0000 +++ b/Python/_warnings.c Thu May 20 21:00:34 2010 +0000 @@ -116,7 +116,7 @@ _filters = warnings_filters; } - if (!PyList_Check(_filters)) { + if (_filters == NULL || !PyList_Check(_filters)) { PyErr_SetString(PyExc_ValueError, MODULE_NAME ".filters must be a list"); return NULL;
