From a72c67236827b5b3088e24095f11bb7194486817 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 29 Aug 2018 13:32:11 +0200 Subject: [PATCH] bpo-34523: Fix config_init_fs_encoding() Call config_init_fs_encoding() if filesystem_errors is not NULL but filesystem_encoding is NULL. --- Python/coreconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/coreconfig.c b/Python/coreconfig.c index 0ec4640336c7f63..625c743a419aef7 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;