Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Edited setup.py in reuseable apps tutorial to use a context manager f…

…or open().
  • Loading branch information...
commit b8d255071ead897cf68120cd2fae7c91326ca2cc 1 parent e7827b9
@djds23 djds23 authored timgraham committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  docs/intro/reusable-apps.txt
View
3  docs/intro/reusable-apps.txt
@@ -192,7 +192,8 @@ this. For a small app like polls, this process isn't too difficult.
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:
+ README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
Please sign in to comment.
Something went wrong with that request. Please try again.