Skip to content

Commit

Permalink
Avoid resource warnings under Py3k.
Browse files Browse the repository at this point in the history
Also, work around edge case on Travis where files aren't found.
  • Loading branch information
tseaver committed Dec 16, 2014
1 parent 58af89b commit 48e08cb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup.py
Expand Up @@ -17,9 +17,15 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = (open(os.path.join(here, 'README.rst')).read()
+ '\n\n' +
open(os.path.join(here, 'CHANGES.rst')).read())

def _read_file(filename):
try:
with open(os.path.join(here, filename)) as f:
return f.read()
except IOError: # Travis???
return ''

README = _read_file('README.rst') + '\n\n' + _read_file('CHANGES.rst')

setup(name='transaction',
version='1.4.4dev',
Expand Down

1 comment on commit 48e08cb

@mgedmin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any failing builds on https://travis-ci.org/zopefoundation/transaction/builds, so why the workaround?

Please sign in to comment.