diff options
author | Just van Rossum <just@letterror.com> | 2001-08-15 21:20:42 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2001-08-15 21:20:42 (GMT) |
commit | ba634b2ec3977cdc61ab097bd455d3ab0f925bf1 (patch) | |
tree | 3b22d60cd6c5b9d30da19d15b757b7990cf6ce5f | |
parent | 28962cc0ea5ff29a7b96b995e1ee3f1bae138148 (diff) | |
download | cpython-ba634b2ec3977cdc61ab097bd455d3ab0f925bf1.zip cpython-ba634b2ec3977cdc61ab097bd455d3ab0f925bf1.tar.gz cpython-ba634b2ec3977cdc61ab097bd455d3ab0f925bf1.tar.bz2 |
Rewrote Jack's latest change so it does what it intended to do...
-rw-r--r-- | Lib/site.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/site.py b/Lib/site.py index a2de4f2..eaa08a7 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -80,10 +80,14 @@ 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. Except on the mac, where files are legal - # in sys.path. - if dir and not os.path.isdir(dir) and sys.platform != 'mac': - continue + # since it's a special case. We also need to special-case the Mac, + # as file names are allowed on sys.path there. + if sys.platform != 'mac': + if dir and not os.path.isdir(dir): + continue + else: + if dir and not os.path.exists(dir): + continue dir, dircase = makepath(dir) if not _dirs_in_sys_path.has_key(dircase): L.append(dir) |