fix resource warnings

This commit is contained in:
Michael Merickel
2013-09-15 01:17:51 -05:00
parent 80058f11e9
commit 01c07f3702

View File

@@ -19,9 +19,13 @@ from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))
def read(fname):
with open(fname) as fp:
return fp.read()
try: try:
README = open(os.path.join(here, 'README.txt')).read() README = read(os.path.join(here, 'README.txt'))
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() CHANGES = read(os.path.join(here, 'CHANGES.txt'))
except: except:
README = '' README = ''
CHANGES = '' CHANGES = ''