summaryrefslogtreecommitdiffstats
path: root/Programs/_freeze_importlib.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-10-01 10:26:04 (GMT)
committerGitHub <noreply@github.com>2019-10-01 10:26:04 (GMT)
commitd49f096cc41f57155efe71cd089c29b38c218488 (patch)
tree1830b017fe1259e6d5cc27390f0331a83b7d8ba2 /Programs/_freeze_importlib.c
parent938c00ca9e4207a2531041edff2e82490b02047f (diff)
downloadcpython-d49f096cc41f57155efe71cd089c29b38c218488.zip
cpython-d49f096cc41f57155efe71cd089c29b38c218488.tar.gz
cpython-d49f096cc41f57155efe71cd089c29b38c218488.tar.bz2
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 <vstinner@redhat.com>
Diffstat (limited to 'Programs/_freeze_importlib.c')
-rw-r--r--Programs/_freeze_importlib.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Programs/_freeze_importlib.c b/Programs/_freeze_importlib.c
index 74735f2..2e4ccbb 100644
--- a/Programs/_freeze_importlib.c
+++ b/Programs/_freeze_importlib.c
@@ -76,17 +76,12 @@ main(int argc, char *argv[])
}
text[text_size] = '\0';
- PyStatus status;
PyConfig config;
-
- status = PyConfig_InitIsolatedConfig(&config);
- if (PyStatus_Exception(status)) {
- PyConfig_Clear(&config);
- Py_ExitStatusException(status);
- }
+ PyConfig_InitIsolatedConfig(&config);
config.site_import = 0;
+ PyStatus status;
status = PyConfig_SetString(&config, &config.program_name,
L"./_freeze_importlib");
if (PyStatus_Exception(status)) {