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__))
def read(fname):
with open(fname) as fp:
return fp.read()
try:
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
README = read(os.path.join(here, 'README.txt'))
CHANGES = read(os.path.join(here, 'CHANGES.txt'))
except:
README = ''
CHANGES = ''