summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-02-25 20:25:12 +0000
committerJust van Rossum <just@letterror.com>2003-02-25 20:25:12 +0000
commit335057179f3d84827fcccab2bcb8f377e6117861 (patch)
treeda266a6debaf9e6d668aa2782308f18c8e0fdc55 /Python/pythonrun.c
parent8edff125d908c7f6c598443b3f84b41c5bb61219 (diff)
downloadcpython-335057179f3d84827fcccab2bcb8f377e6117861.tar.gz
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 2845d24295..908bc42f6e 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