summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-15 12:07:46 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-08-15 12:07:46 (GMT)
commit31b5323c84f3203ffc8ccf09bf62d1fef10bccd4 (patch)
treecf2adbbd34a7e841c4bac37ffc68dfa1a476c251 /Lib/site.py
parent591f71b1d4123fc6927c06ffb3ac7702b002cbfd (diff)
downloadcpython-31b5323c84f3203ffc8ccf09bf62d1fef10bccd4.zip
cpython-31b5323c84f3203ffc8ccf09bf62d1fef10bccd4.tar.gz
cpython-31b5323c84f3203ffc8ccf09bf62d1fef10bccd4.tar.bz2
Don't remove non-directories from sys.path on the mac: files
can be on sys.path too.
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py
index be53065..a2de4f2 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -80,8 +80,9 @@ L = []
_dirs_in_sys_path = {}
for dir in sys.path:
# Filter out paths that don't exist, but leave in the empty string
- # since it's a special case.
- if dir and not os.path.isdir(dir):
+ # since it's a special case. Except on the mac, where files are legal
+ # in sys.path.
+ if dir and not os.path.isdir(dir) and sys.platform != 'mac':
continue
dir, dircase = makepath(dir)
if not _dirs_in_sys_path.has_key(dircase):