summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 15b260dd..0e912156 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1538,9 +1538,8 @@ class PthDistributions(Environment):
if os.path.islink(self.filename):
os.unlink(self.filename)
- f = open(self.filename, 'wt')
- f.write(data)
- f.close()
+ with open(self.filename, 'wt') as f:
+ f.write(data)
elif os.path.exists(self.filename):
log.debug("Deleting empty %s", self.filename)