Commit 76ffa368 authored by Jason R. Coombs's avatar Jason R. Coombs

Use context manager for opening file

parent 81ca4fea
...@@ -125,9 +125,8 @@ class develop(easy_install): ...@@ -125,9 +125,8 @@ class develop(easy_install):
# create an .egg-link in the installation dir, pointing to our egg # create an .egg-link in the installation dir, pointing to our egg
log.info("Creating %s (link to %s)", self.egg_link, self.egg_base) log.info("Creating %s (link to %s)", self.egg_link, self.egg_base)
if not self.dry_run: if not self.dry_run:
f = open(self.egg_link, "w") with open(self.egg_link, "w") as f:
f.write(self.egg_path + "\n" + self.setup_path) f.write(self.egg_path + "\n" + self.setup_path)
f.close()
# postprocess the installed distro, fixing up .pth, installing scripts, # postprocess the installed distro, fixing up .pth, installing scripts,
# and handling requirements # and handling requirements
self.process_distribution(None, self.dist, not self.no_deps) self.process_distribution(None, self.dist, not self.no_deps)
......
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