mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #16309: Make PYTHONPATH= behavior the same as if PYTHONPATH not set at all.
Thanks to Armin Rigo and Alexey Kachayev.
This commit is contained in:
parent
683b46aa8d
commit
69032c81aa
4 changed files with 22 additions and 3 deletions
|
@ -699,13 +699,11 @@ calculate_path(void)
|
|||
*/
|
||||
bufsz = 0;
|
||||
|
||||
if (_rtpypath) {
|
||||
if (_rtpypath && _rtpypath[0] != '\0') {
|
||||
size_t rtpypath_len;
|
||||
rtpypath = _Py_char2wchar(_rtpypath, &rtpypath_len);
|
||||
if (rtpypath != NULL)
|
||||
bufsz += rtpypath_len + 1;
|
||||
else
|
||||
_rtpypath = NULL;
|
||||
}
|
||||
|
||||
defpath = _pythonpath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue