Commits

Hanno Schlichting committed 66f10a8

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

Comments (0)

Files changed (1)

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