summaryrefslogtreecommitdiffstats
path: root/Python/coreconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-08-29 11:45:34 (GMT)
committerGitHub <noreply@github.com>2018-08-29 11:45:34 (GMT)
commit70fead25e503a742ad4c919b151b9b2b5facee36 (patch)
treea19e860d5dd1cd667f43b362cc7fe6ec8bd75e19 /Python/coreconfig.c
parentb2457efc78b74a1d6d1b77d11a939e886b8a4e2c (diff)
downloadcpython-70fead25e503a742ad4c919b151b9b2b5facee36.zip
cpython-70fead25e503a742ad4c919b151b9b2b5facee36.tar.gz
cpython-70fead25e503a742ad4c919b151b9b2b5facee36.tar.bz2
bpo-34523: Fix config_init_fs_encoding() (GH-8991)
Call config_init_fs_encoding() if filesystem_errors is not NULL but filesystem_encoding is NULL.
Diffstat (limited to 'Python/coreconfig.c')
-rw-r--r--Python/coreconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/coreconfig.c b/Python/coreconfig.c
index 0ec4640..625c743 100644
--- a/Python/coreconfig.c
+++ b/Python/coreconfig.c
@@ -1344,7 +1344,7 @@ _PyCoreConfig_Read(_PyCoreConfig *config)
config->argc = 0;
}
- if (config->filesystem_encoding == NULL && config->filesystem_errors == NULL) {
+ if (config->filesystem_encoding == NULL || config->filesystem_errors == NULL) {
err = config_init_fs_encoding(config);
if (_Py_INIT_FAILED(err)) {
return err;