summaryrefslogtreecommitdiff
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index d93fe06555..185d4066e5 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -801,13 +801,22 @@ pyinit_coreconfig(_PyRuntimeState *runtime,
const _PyArgv *args,
PyInterpreterState **interp_p)
{
+ _PyInitError err;
+
if (src_config) {
if (_PyCoreConfig_Copy(config, src_config) < 0) {
return _Py_INIT_NO_MEMORY();
}
}
- _PyInitError err = _PyCoreConfig_Read(config, args);
+ if (args) {
+ err = _PyCoreConfig_SetPyArgv(config, args);
+ if (_Py_INIT_FAILED(err)) {
+ return err;
+ }
+ }
+
+ err = _PyCoreConfig_Read(config);
if (_Py_INIT_FAILED(err)) {
return err;
}