summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/site.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 682bbd5..148a93f 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 a1a5351..b0693e0 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.