Ensure file handle is closed by using with statement

This commit is contained in:
Michael Rice 2014-10-12 17:19:53 -05:00
parent c1d481b23f
commit a5a9b4dcc7

@ -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()