summaryrefslogtreecommitdiffstats
path: root/Python/pathconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-10-01 10:06:16 (GMT)
committerGitHub <noreply@github.com>2019-10-01 10:06:16 (GMT)
commit8462a4936b3a551dc546a6adea04a70b0a07ca67 (patch)
tree3c4655f174d1aa9abcdb5226532db0e4d7434bca /Python/pathconfig.c
parent3c30a76f3d3c0dcc1fb4de097fa4a3a4c92c0b0b (diff)
downloadcpython-8462a4936b3a551dc546a6adea04a70b0a07ca67.zip
cpython-8462a4936b3a551dc546a6adea04a70b0a07ca67.tar.gz
cpython-8462a4936b3a551dc546a6adea04a70b0a07ca67.tar.bz2
bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)
PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore.
Diffstat (limited to 'Python/pathconfig.c')
-rw-r--r--Python/pathconfig.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 5550194..61408e1 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -432,16 +432,11 @@ _PyConfig_InitPathConfig(PyConfig *config)
static PyStatus
pathconfig_global_read(_PyPathConfig *pathconfig)
{
- PyStatus status;
PyConfig config;
-
- status = _PyConfig_InitCompatConfig(&config);
- if (_PyStatus_EXCEPTION(status)) {
- goto done;
- }
+ _PyConfig_InitCompatConfig(&config);
/* Call _PyConfig_InitPathConfig() */
- status = PyConfig_Read(&config);
+ PyStatus status = PyConfig_Read(&config);
if (_PyStatus_EXCEPTION(status)) {
goto done;
}