Commit ba634b2e authored by Just van Rossum's avatar Just van Rossum

Rewrote Jack's latest change so it does what it intended to do...

parent 28962cc0
...@@ -80,10 +80,14 @@ L = [] ...@@ -80,10 +80,14 @@ L = []
_dirs_in_sys_path = {} _dirs_in_sys_path = {}
for dir in sys.path: for dir in sys.path:
# Filter out paths that don't exist, but leave in the empty string # 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 # since it's a special case. We also need to special-case the Mac,
# in sys.path. # as file names are allowed on sys.path there.
if dir and not os.path.isdir(dir) and sys.platform != 'mac': if sys.platform != 'mac':
continue if dir and not os.path.isdir(dir):
continue
else:
if dir and not os.path.exists(dir):
continue
dir, dircase = makepath(dir) dir, dircase = makepath(dir)
if not _dirs_in_sys_path.has_key(dircase): if not _dirs_in_sys_path.has_key(dircase):
L.append(dir) L.append(dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment