mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Back out last patch that removed an entry from sys.path if it was not an
existent path. Pointed out by jvr that entries could be non-file items for custom importers.
This commit is contained in:
parent
c82208eecb
commit
46cf4fc249
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ for dir in sys.path:
|
||||||
# if they only differ in case); turn relative paths into absolute
|
# if they only differ in case); turn relative paths into absolute
|
||||||
# paths.
|
# paths.
|
||||||
dir, dircase = makepath(dir)
|
dir, dircase = makepath(dir)
|
||||||
if not dircase in _dirs_in_sys_path and os.path.exists(dir):
|
if not dircase in _dirs_in_sys_path:
|
||||||
L.append(dir)
|
L.append(dir)
|
||||||
_dirs_in_sys_path[dircase] = 1
|
_dirs_in_sys_path[dircase] = 1
|
||||||
sys.path[:] = L
|
sys.path[:] = L
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue