mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-8901: Windows registry path is now ignored with the -E option (GH-18169)
This commit is contained in:
parent
53e4c91725
commit
676b105111
3 changed files with 11 additions and 2 deletions
|
|
@ -783,8 +783,11 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
|||
{
|
||||
int skiphome = calculate->home==NULL ? 0 : 1;
|
||||
#ifdef Py_ENABLE_SHARED
|
||||
calculate->machine_path = getpythonregpath(HKEY_LOCAL_MACHINE, skiphome);
|
||||
calculate->user_path = getpythonregpath(HKEY_CURRENT_USER, skiphome);
|
||||
if (!Py_IgnoreEnvironmentFlag) {
|
||||
calculate->machine_path = getpythonregpath(HKEY_LOCAL_MACHINE,
|
||||
skiphome);
|
||||
calculate->user_path = getpythonregpath(HKEY_CURRENT_USER, skiphome);
|
||||
}
|
||||
#endif
|
||||
/* We only use the default relative PYTHONPATH if we haven't
|
||||
anything better to use! */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue