Kaydet (Commit) b8d25507 authored tarafından Dean Silfen's avatar Dean Silfen Kaydeden (comit) Tim Graham

Edited setup.py in reuseable apps tutorial to use a context manager for open().

üst e7827b94
......@@ -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)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment