summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-10 22:30:19 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-10 22:30:19 (GMT)
commit6664426d7cdb63b88d973a731cc442ecba10047a (patch)
tree7c809077569e93086eb42e1e29eea8fb5c6eb582 /Python/import.c
parente9e07bf5c988bdfe4158d3ac14b25312430f1bd0 (diff)
downloadcpython-6664426d7cdb63b88d973a731cc442ecba10047a.zip
cpython-6664426d7cdb63b88d973a731cc442ecba10047a.tar.gz
cpython-6664426d7cdb63b88d973a731cc442ecba10047a.tar.bz2
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.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index eb50bc5..bcdd68e 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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)