mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
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.
This commit is contained in:
parent
e9e07bf5c9
commit
6664426d7c
6 changed files with 48 additions and 23 deletions
|
@ -2748,8 +2748,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue