From c96be811fa7da8ddcea18cc7abcae94e0f5ff966 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 14 May 2019 17:34:56 +0200 Subject: bpo-36900: Replace global conf vars with config (GH-13299) Replace global configuration variables with core_config read from the current interpreter. Cleanup dynload_hpux.c. --- Python/pythonrun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 199ea82434..3d83044af9 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -591,10 +591,12 @@ handle_system_exit(void) PyObject *exception, *value, *tb; int exitcode = 0; - if (Py_InspectFlag) + int inspect = _PyInterpreterState_GET_UNSAFE()->core_config.inspect; + if (inspect) { /* Don't exit if -i flag was given. This flag is set to 0 * when entering interactive mode for inspecting. */ return; + } PyErr_Fetch(&exception, &value, &tb); fflush(stdout); -- cgit v1.2.1