mirror of https://github.com/python/cpython
Correct previous patch looking for warnings module: sys.modules, not
sys.__modules__.
This commit is contained in:
parent
b233e54409
commit
5f4e8ca376
|
@ -92,7 +92,7 @@ PyObject *PyModule_GetWarningsModule()
|
|||
/* Save and restore any exceptions */
|
||||
PyErr_Fetch(&typ, &val, &tb);
|
||||
|
||||
all_modules = PySys_GetObject("__modules__");
|
||||
all_modules = PySys_GetObject("modules");
|
||||
if (all_modules) {
|
||||
warnings_module = PyDict_GetItemString(all_modules, "warnings");
|
||||
/* We keep a ref in the global */
|
||||
|
|
Loading…
Reference in New Issue