diff options
| author | Hanno Schlichting <hanno@hannosch.eu> | 2009-07-16 18:44:54 +0200 |
|---|---|---|
| committer | Hanno Schlichting <hanno@hannosch.eu> | 2009-07-16 18:44:54 +0200 |
| commit | e4ab19caa7979f2ecedf223fac6a6dee69c25986 (patch) | |
| tree | 5f492e4275f1cb6393498e2afb5db2076991c913 | |
| parent | c44c211541bb33d263acd58f09e51088f15fd5c5 (diff) | |
| download | python-setuptools-git-e4ab19caa7979f2ecedf223fac6a6dee69c25986.tar.gz | |
Allow to find_on_path on systems with tight permissions to fail gracefully. This closes #9.
--HG--
branch : distribute
extra : rebase_source : ff1f9a886a4524e59ea14f4063bf9074d0568082
| -rw-r--r-- | pkg_resources.py | 2 |
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( |
