diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-20 07:58:57 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-20 07:58:57 -0400 |
commit | 6b6a4488adc12d390c5e0c8f13829dd9bf125309 (patch) | |
tree | 4eeeeb857c02023fd46d610612f600d533105afb /setup.py | |
parent | 2e5688eedd1576e9b100386c0a9ae30828123f73 (diff) | |
download | python-coveragepy-git-6b6a4488adc12d390c5e0c8f13829dd9bf125309.tar.gz |
with statements: no more finally close
--HG--
branch : 4.0
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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() |