Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Close opened file in setup.py script #1014

Merged
merged 1 commit into from Oct 14, 2012
Jump to file or symbol
Failed to load files and symbols.
+7 −1
Split
View
@@ -23,6 +23,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+from __future__ import with_statement
+
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
@@ -39,10 +41,14 @@
print >> sys.stderr, error
sys.exit(1)
+def readme():
+ with open("README.rst") as f:
+ return f.read()
+
setup(name = "boto",
version = __version__,
description = "Amazon Web Services Library",
- long_description = open("README.rst").read(),
+ long_description = readme(),
author = "Mitch Garnaat",
author_email = "mitch@garnaat.com",
scripts = ["bin/sdbadmin", "bin/elbadmin", "bin/cfadmin",