Issue #341: Fix a ResourceWarning.

--HG--
branch : distribute
extra : rebase_source : 63fc40de80b49769d8463e04c1590ea4b1e751fc
parent 73e70541
......@@ -12,6 +12,7 @@ CHANGES
* Fix issue in pkg_resources where try/except around a platform-dependent
import would trigger hook load failures on Mercurial. See pull request 32
for details.
* Issue #341: Fix a ResourceWarning.
------
0.6.32
......
......@@ -1761,11 +1761,13 @@ def find_on_path(importer, path_item, only=False):
for dist in find_distributions(os.path.join(path_item, entry)):
yield dist
elif not only and lower.endswith('.egg-link'):
for line in open(os.path.join(path_item, entry)):
entry_file = open(os.path.join(path_item, entry))
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_file.close()
register_finder(ImpWrapper,find_on_path)
if importlib_bootstrap is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment