From 2e5fc63307b88956ff5fe8c4c68425fccb07b200 Mon Sep 17 00:00:00 2001 From: Simeon Visser Date: Sat, 7 Jun 2014 03:49:50 +0200 Subject: [PATCH] Ensure README file is properly closed by setup.py --- setup.py.jinja2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py.jinja2 b/setup.py.jinja2 index fae97f22..05ef59c2 100644 --- a/setup.py.jinja2 +++ b/setup.py.jinja2 @@ -1,7 +1,8 @@ import os from setuptools import setup -README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() +with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme_file: + README = readme_file.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))