diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2014-10-26 22:30:46 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2014-10-26 22:30:46 +0200 |
commit | 583381c61228d8f43c510a4045c689d0f6c89f6e (patch) | |
tree | e0944342126519a90e8d3cd1f2d4e809d4285c6f /setup.py | |
parent | 3af931192ad779d28c4f95c49b9212c402042246 (diff) | |
download | pylint-583381c61228d8f43c510a4045c689d0f6c89f6e.tar.gz |
Use a with statement in setup.py
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -109,9 +109,8 @@ class MyInstallLib(install_lib.install_lib): product_init = join(self.install_dir, subpackage_of, '__init__.py') if not exists(product_init): self.announce('creating %s' % product_init) - stream = open(product_init, 'w') - stream.write(EMPTY_FILE) - stream.close() + with open(product_init, 'w') as stream: + stream.write(EMPTY_FILE) # manually install included directories if any if include_dirs: if subpackage_of: |