diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2012-06-13 23:45:42 +0200 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2012-06-13 23:45:42 +0200 |
commit | 7a051649b03cdda160fe47376b4aa10ec8cdb5c2 (patch) | |
tree | f9298257f8f81050b85d97963f2751fb0636b85a /setup.py | |
parent | 3778850caaa1193755dc1b798b1dc69cf4980301 (diff) | |
download | pep8-7a051649b03cdda160fe47376b4aa10ec8cdb5c2.tar.gz |
Update setup.py
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1,24 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import with_statement from setuptools import setup, find_packages def get_version(): - f = open('pep8.py') - try: + with open('pep8.py') as f: for line in f: if line.startswith('__version__'): return eval(line.split('=')[-1]) - finally: - f.close() def get_long_description(): descr = [] for fname in 'README.rst', 'CHANGES.txt': # , 'TODO.txt' - f = open(fname) - try: + with open(fname) as f: descr.append(f.read()) - finally: - f.close() return '\n\n'.join(descr) |