Commits

Anonymous committed 7fa57e1

Changed file() calls to open() calls

Comments (0)

Files changed (3)

                     for dist in find_distributions(os.path.join(path_item, entry)):
                         yield dist
                 elif not only and lower.endswith('.egg-link'):
-                    for line in file(os.path.join(path_item, entry)):
+                    for line in open(os.path.join(path_item, entry)):
                         if not line.strip(): continue
                         for item in find_distributions(os.path.join(path_item,line.rstrip())):
                             yield item

setuptools/command/develop.py

     def uninstall_link(self):
         if os.path.exists(self.egg_link):
             log.info("Removing %s (link to %s)", self.egg_link, self.egg_base)
-            contents = [line.rstrip() for line in file(self.egg_link)]
+            contents = [line.rstrip() for line in open(self.egg_link)]
             if contents not in ([self.egg_path], [self.egg_path, self.setup_path]):
                 log.warn("Link points to %s: uninstall aborted", contents)
                 return

setuptools/package_index.py

                         self.scan_egg_link(item, entry)
 
     def scan_egg_link(self, path, entry):
-        lines = filter(None, map(str.strip, file(os.path.join(path, entry))))
+        lines = filter(None, map(str.strip, open(os.path.join(path, entry))))
         if len(lines)==2:
             for dist in find_distributions(os.path.join(path, lines[0])):
                 dist.location = os.path.join(path, *lines)