summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-10-26 22:30:46 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2014-10-26 22:30:46 +0200
commit583381c61228d8f43c510a4045c689d0f6c89f6e (patch)
treee0944342126519a90e8d3cd1f2d4e809d4285c6f /setup.py
parent3af931192ad779d28c4f95c49b9212c402042246 (diff)
downloadpylint-583381c61228d8f43c510a4045c689d0f6c89f6e.tar.gz
Use a with statement in setup.py
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 4cd2396..b4f8240 100644
--- a/setup.py
+++ b/setup.py
@@ -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: