Commits

Tres Seaver  committed 23c310b

Close issue #341: 0.6.33 fails to build under python 2.4

  • Participants
  • Parent commits fa85e62
  • Tags 0.6.34

Comments (0)

Files changed (2)

 CHANGES
 =======
 
+----------
+Unreleased
+----------
+
++ Issue #341: 0.6.33 fails to build under python 2.4
+
 ------
 0.6.33
 ------

File pkg_resources.py

                 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: