summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt6
-rw-r--r--pkg_resources.py11
2 files changed, 12 insertions, 5 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index ebc2bdcc..1b248108 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,12 @@
CHANGES
=======
+----------
+Unreleased
+----------
+
++ Issue #341: 0.6.33 fails to build under python 2.4
+
------
0.6.33
------
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: