mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Correct previous patch looking for warnings module: sys.modules, not
sys.__modules__.
This commit is contained in:
parent
b233e54409
commit
5f4e8ca376
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue