diff options
Diffstat (limited to 'Modules/getpath.py')
-rw-r--r-- | Modules/getpath.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/getpath.py b/Modules/getpath.py index 9aff19c..47f075c 100644 --- a/Modules/getpath.py +++ b/Modules/getpath.py @@ -228,6 +228,7 @@ ENV_PYTHONPATH = config['pythonpath_env'] use_environment = config.get('use_environment', 1) pythonpath = config.get('module_search_paths') +pythonpath_was_set = config.get('module_search_paths_set') real_executable_dir = None stdlib_dir = None @@ -626,8 +627,8 @@ if py_setpath: config['module_search_paths'] = py_setpath.split(DELIM) config['module_search_paths_set'] = 1 -elif not pythonpath: - # If pythonpath was already set, we leave it alone. +elif not pythonpath_was_set: + # If pythonpath was already explicitly set or calculated, we leave it alone. # This won't matter in normal use, but if an embedded host is trying to # recalculate paths while running then we do not want to change it. pythonpath = [] |