From: Brett Cannon Date: Sat, 20 Mar 2004 21:31:33 +0000 (+0000) Subject: Remove non-existent paths. X-Git-Tag: v2.4a1~658 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc45466b8f066919a92b84b0d46c4cd40922df4d;p=python Remove non-existent paths. --- diff --git a/Lib/site.py b/Lib/site.py index 682bbd5e40..148a93f0b3 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index a1a53511a9..b0693e0444 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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.