Skip to content

Commit

Permalink
fix python3 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
osallou committed Oct 10, 2016
1 parent 97bf6e2 commit ad924e3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions setup.py
Expand Up @@ -14,10 +14,16 @@ def run(self):
SchemaVersion.migrate_pendings()

here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
try:
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
except UnicodeDecodeError:
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt'), encoding='utf-8') as f:
CHANGES = f.read()


config = {
Expand Down

0 comments on commit ad924e3

Please sign in to comment.