diff options
| author | Tres Seaver <tseaver@palladion.com> | 2012-12-30 23:45:44 -0500 |
|---|---|---|
| committer | Tres Seaver <tseaver@palladion.com> | 2012-12-30 23:45:44 -0500 |
| commit | 2f8c8bd5de518bd1b42cb99f1a6644543520154b (patch) | |
| tree | 1921a31ec74906821c3b8c66a0de7e118808ce37 /pkg_resources.py | |
| parent | 2a3d28cf5fed225bfe2c3f95dfbf61c2d23fd6c4 (diff) | |
| download | python-setuptools-git-2f8c8bd5de518bd1b42cb99f1a6644543520154b.tar.gz | |
Close issue #341: 0.6.33 fails to build under python 2.40.6.34
--HG--
branch : distribute
extra : rebase_source : 065aad71143a72cb6abd3064e0e947fc4568422f
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index cb8d3dcf..49aab675 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1763,13 +1763,14 @@ def find_on_path(importer, path_item, only=False): elif not only and lower.endswith('.egg-link'): entry_file = open(os.path.join(path_item, entry)) try: - for line in entry_file: - if not line.strip(): continue - for item in find_distributions(os.path.join(path_item,line.rstrip())): - yield item - break + entry_lines = entry_file.readlines() finally: entry_file.close() + for line in entry_lines: + if not line.strip(): continue + for item in find_distributions(os.path.join(path_item,line.rstrip())): + yield item + break register_finder(ImpWrapper,find_on_path) if importlib_bootstrap is not None: |
