summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-14 17:34:56 +0200
committerGitHub <noreply@github.com>2019-05-14 17:34:56 +0200
commitc96be811fa7da8ddcea18cc7abcae94e0f5ff966 (patch)
treef3c6833ba92a084dc604498aecef6ef9103d6dfa /Python/pythonrun.c
parent3c93153f7db5dd9b06f229e61978fd9199b3c097 (diff)
downloadcpython-git-c96be811fa7da8ddcea18cc7abcae94e0f5ff966.tar.gz
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.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 3 insertions, 1 deletions
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);