diff setup.py @ 9:d5970cf6367d

Add a read function to close file descriptor after the file has been read
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 26 Sep 2014 20:15:36 +0200
parents f804af69b783
children e41682c4bf7e
line wrap: on
line diff
--- a/setup.py	Fri Sep 26 20:14:57 2014 +0200
+++ b/setup.py	Fri Sep 26 20:15:36 2014 +0200
@@ -4,11 +4,15 @@
 
 version = '0.1'
 
+def read(filename):
+    with open(filename, "r") as f:
+        return f.read()
+
 setup(
     name='odfcast',
     version=version,
     description="A conversion http service based on py3o",
-    long_description=open("README.rst").read(),
+    long_description=read("README.rst"),
     classifiers=[
         "Development Status :: 3 - Alpha",
         "Operating System :: POSIX :: Linux",
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)