mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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. ........
This commit is contained in:
parent
784c027d18
commit
148051a054
4 changed files with 47 additions and 11 deletions
|
@ -116,7 +116,7 @@ get_filter(PyObject *category, PyObject *text, Py_ssize_t lineno,
|
|||
_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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue