Close file in setup.py after finished reading

Fixes a "ResourceWarning: unclosed file" during tests.
This commit is contained in:
Jon Dufresne 2016-11-08 17:54:23 -08:00
parent e768e7fa45
commit e2e4d180f9

View File

@ -100,7 +100,8 @@ def _lib_include(root):
def _read(file):
return open(file, 'rb').read()
with open(file, 'rb') as fp:
return fp.read()
try: