Commit e4ab19ca authored by Hanno Schlichting's avatar Hanno Schlichting

Allow to find_on_path on systems with tight permissions to fail gracefully. This closes #9.

--HG--
branch : distribute
extra : rebase_source : ff1f9a886a4524e59ea14f4063bf9074d0568082
parent c44c2115
......@@ -1649,7 +1649,7 @@ def find_on_path(importer, path_item, only=False):
"""Yield distributions accessible on a sys.path directory"""
path_item = _normalize_cached(path_item)
if os.path.isdir(path_item):
if os.path.isdir(path_item) and os.access(path_item, os.R_OK):
if path_item.lower().endswith('.egg'):
# unpacked egg
yield Distribution.from_filename(
......
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