From 8462a4936b3a551dc546a6adea04a70b0a07ca67 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 1 Oct 2019 12:06:16 +0200 Subject: bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509) PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore. --- 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 69b86ce4f7..f3d89e7d2b 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -205,14 +205,7 @@ PyInterpreterState_New(void) memset(interp, 0, sizeof(*interp)); interp->id_refcount = -1; - 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