summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setuptools/command/bdist_egg.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py
index 0d1cc65e..c19a0ba7 100644
--- a/setuptools/command/bdist_egg.py
+++ b/setuptools/command/bdist_egg.py
@@ -44,9 +44,8 @@ def write_stub(resource, pyfile):
imp.load_dynamic(__name__,__file__)
__bootstrap__()
""").lstrip()
- f = open(pyfile,'w')
- f.write(_stub_template % resource)
- f.close()
+ with open(pyfile, 'w') as f:
+ f.write(_stub_template % resource)
class bdist_egg(Command):