summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 87072b4d..ea01817b 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -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(