From ea1642910eafe86b6749af852ce5b37525b742c8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 21 Mar 2010 14:02:32 +0000 Subject: Partial backport of r78826: leave import site error handler unchanged (print the error and continue). Merged revisions 78826-78827 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78826 | victor.stinner | 2010-03-10 23:30:19 +0100 (mer., 10 mars 2010) | 5 lines Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt (SIGINT). If an error occurs while importing the site module, the error is printed and Python exits. Initialize the GIL before importing the site module. ........ r78827 | victor.stinner | 2010-03-10 23:45:04 +0100 (mer., 10 mars 2010) | 4 lines ooops, fix error message in execusercustomize() Copy/paste failure :-) ........ --- Python/import.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Python/import.c') diff --git a/Python/import.c b/Python/import.c index 43eabb830b..eb731d060c 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2744,8 +2744,6 @@ PyImport_Import(PyObject *module_name) } else { /* No globals -- use standard builtins, and fake globals */ - PyErr_Clear(); - builtins = PyImport_ImportModuleLevel("__builtin__", NULL, NULL, NULL, 0); if (builtins == NULL) -- cgit v1.2.1