Commit d73c8722 authored by Tres Seaver's avatar Tres Seaver

Harden fix for issue #341 against exceptins.

--HG--
branch : distribute
extra : rebase_source : 5cb7f22523a741e678b03a699f0ef09f09ed8070
parent 721559fe
......@@ -1762,12 +1762,14 @@ def find_on_path(importer, path_item, only=False):
yield dist
elif not only and lower.endswith('.egg-link'):
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()
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
finally:
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