From 249ad14dfedbe45919b48dbbff445394a64d985c Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 20 Oct 2013 07:58:57 -0400 Subject: with statements: no more finally close --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index e96bdb7..215102b 100644 --- a/setup.py +++ b/setup.py @@ -54,11 +54,8 @@ doc = __doc__ # __doc__ will be overwritten by version.py. __version__ = __url__ = "" # Keep pylint happy. cov_ver_py = os.path.join(os.path.split(__file__)[0], "coverage/version.py") -version_file = open(cov_ver_py) -try: +with open(cov_ver_py) as version_file: exec(compile(version_file.read(), cov_ver_py, 'exec')) -finally: - version_file.close() doclines = (doc % __url__).splitlines() classifier_list = classifiers.splitlines() -- cgit v1.2.1