Commit 86cd5168 authored by Jason R. Coombs's avatar Jason R. Coombs

Use file context for write_stub

parent c410f8d4
......@@ -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):
......
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