Merge pull request #177 from michaelrice/setup_patch
Ensure file handle is closed by using with statement
This commit is contained in:
commit
7986a824cf
3
setup.py
3
setup.py
@ -18,7 +18,8 @@ import os
|
||||
|
||||
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
with open(os.path.join(os.path.dirname(__file__), fname)) as fn:
|
||||
return fn.read()
|
||||
|
||||
with open('requirements.txt') as f:
|
||||
required = f.read().splitlines()
|
||||
|
Loading…
x
Reference in New Issue
Block a user