]> granicus.if.org Git - python/commitdiff
Add missing read() in distutils doc.
authorÉric Araujo <merwok@netwok.org>
Fri, 25 Feb 2011 21:40:34 +0000 (21:40 +0000)
committerÉric Araujo <merwok@netwok.org>
Fri, 25 Feb 2011 21:40:34 +0000 (21:40 +0000)
Doc/distutils/uploading.rst

index 68c1e52d56c9da85d3b15de748cc82694f10335b..1b3cb589ecc6b5a5c884ef2f37a8adc92ff8cba0 100644 (file)
@@ -57,8 +57,11 @@ in the package::
 
     from distutils.core import setup
 
+    with open('README.txt') as file:
+        long_description = file.read()
+
     setup(name='Distutils',
-          long_description=open('README.txt'))
+          long_description=long_description)
 
 In that case, :file:`README.txt` is a regular reStructuredText text file located
 in the root of the package besides :file:`setup.py`.