Remove non-existent paths.

This commit is contained in:
Brett Cannon 2004-03-20 21:31:33 +00:00
parent 75be012cba
commit cc45466b8f
2 changed files with 3 additions and 1 deletions

View file

@ -79,7 +79,7 @@ for dir in sys.path:
# if they only differ in case); turn relative paths into absolute
# paths.
dir, dircase = makepath(dir)
if not dircase in _dirs_in_sys_path:
if not dircase in _dirs_in_sys_path and os.path.exists(dir):
L.append(dir)
_dirs_in_sys_path[dircase] = 1
sys.path[:] = L

View file

@ -276,6 +276,8 @@ Extension modules
Library
-------
- site.py now removes paths that do not exist.
- The ptcp154 codec was added for Kazakh character set support.
- Support non-anonymous ftp URLs in urllib2.