From d49f096cc41f57155efe71cd089c29b38c218488 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 1 Oct 2019 03:26:04 -0700 Subject: bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509) PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore. (cherry picked from commit 8462a4936b3a551dc546a6adea04a70b0a07ca67) Co-authored-by: Victor Stinner --- Python/pystate.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 098280d76d..aba673c00a 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -206,14 +206,7 @@ PyInterpreterState_New(void) interp->id_refcount = -1; interp->check_interval = 100; - PyStatus status = PyConfig_InitPythonConfig(&interp->config); - if (_PyStatus_EXCEPTION(status)) { - /* Don't report status to caller: PyConfig_InitPythonConfig() - can only fail with a memory allocation error. */ - PyConfig_Clear(&interp->config); - PyMem_RawFree(interp); - return NULL; - } + PyConfig_InitPythonConfig(&interp->config); interp->eval_frame = _PyEval_EvalFrameDefault; #ifdef HAVE_DLOPEN -- cgit v1.2.1