summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-02-25 20:25:12 (GMT)
committerJust van Rossum <just@letterror.com>2003-02-25 20:25:12 (GMT)
commit5bfba3aeb9f451599b89f6239467d485f4370b81 (patch)
treeecbbb187c97a8b86297dec1a26d9a3694eabe9f9 /Python/pythonrun.c
parent7322b1ad46d6eeb7af609082f2a4896719e382d6 (diff)
downloadcpython-5bfba3aeb9f451599b89f6239467d485f4370b81.zip
cpython-5bfba3aeb9f451599b89f6239467d485f4370b81.tar.gz
cpython-5bfba3aeb9f451599b89f6239467d485f4370b81.tar.bz2
Addendum to #683658:
import warnings.py _after_ site.py has run. This ensures that site.py is again the first .py to be imported, giving it back full control over sys.path.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 2845d24..908bc42 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -174,13 +174,13 @@ Py_Initialize(void)
_PyImportHooks_Init();
- PyModule_WarningsModule = PyImport_ImportModule("warnings");
-
initsigs(); /* Signal handling stuff, including initintr() */
initmain(); /* Module __main__ */
if (!Py_NoSiteFlag)
initsite(); /* Module site */
+
+ PyModule_WarningsModule = PyImport_ImportModule("warnings");
}
#ifdef COUNT_ALLOCS