diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-08-29 11:45:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-29 11:45:34 (GMT) |
commit | 70fead25e503a742ad4c919b151b9b2b5facee36 (patch) | |
tree | a19e860d5dd1cd667f43b362cc7fe6ec8bd75e19 /Python | |
parent | b2457efc78b74a1d6d1b77d11a939e886b8a4e2c (diff) | |
download | cpython-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')
-rw-r--r-- | Python/coreconfig.c | 2 |
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; |