From cc45466b8f066919a92b84b0d46c4cd40922df4d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 20 Mar 2004 21:31:33 +0000 Subject: [PATCH] Remove non-existent paths. --- Lib/site.py | 2 +- Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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. -- 2.50.1