Commit ea659db3 authored by Mark Hammond's avatar Mark Hammond

Correct previous patch looking for warnings module: sys.modules, not

sys.__modules__.
parent d5270084
...@@ -92,7 +92,7 @@ PyObject *PyModule_GetWarningsModule() ...@@ -92,7 +92,7 @@ PyObject *PyModule_GetWarningsModule()
/* Save and restore any exceptions */ /* Save and restore any exceptions */
PyErr_Fetch(&typ, &val, &tb); PyErr_Fetch(&typ, &val, &tb);
all_modules = PySys_GetObject("__modules__"); all_modules = PySys_GetObject("modules");
if (all_modules) { if (all_modules) {
warnings_module = PyDict_GetItemString(all_modules, "warnings"); warnings_module = PyDict_GetItemString(all_modules, "warnings");
/* We keep a ref in the global */ /* We keep a ref in the global */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment