Commits

Hanno Schlichting  committed 66f10a8

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

  • Participants
  • Parent commits b362d46
  • Branches setuptools-0.6

Comments (0)

Files changed (1)

File pkg_resources.py

     """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(