Skip to content

Commit d300c47

Browse files
committed
Ensure file handles are closed using with statement
1 parent 5ff9275 commit d300c47

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@
2121
print(" git push --tags")
2222
sys.exit()
2323

24-
readme = open('README.rst').read()
25-
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
24+
with open('README.rst') as readme_file:
25+
readme = readme_file.read()
26+
27+
with open('HISTORY.rst') as history_file:
28+
history = history_file.read().replace('.. :changelog:', '')
2629

2730
setup(
2831
name='django-bootstrap3',

0 commit comments

Comments
 (0)