diff options
author | Ben Firshman <ben@firshman.co.uk> | 2016-11-28 14:37:34 +0000 |
---|---|---|
committer | Ben Firshman <ben@firshman.co.uk> | 2016-11-28 14:38:38 +0000 |
commit | a658e14e8b7f578d55102b981ce8828b906b432f (patch) | |
tree | 9b07ea22db43611272cc9e5ca0723d173151ce68 /setup.py | |
parent | c66c7f8b0a8ca216e21c9fe1903eb79f4406a93e (diff) | |
download | docker-py-a658e14e8b7f578d55102b981ce8828b906b432f.tar.gz |
Specify encoding when loading readme
Loading readme fails when system locale is not utf-8.
Potentially replaces #1313
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,5 @@ #!/usr/bin/env python +import codecs import os import sys @@ -35,7 +36,7 @@ with open('./test-requirements.txt') as test_reqs_txt: long_description = '' try: - with open('./README.rst') as readme_rst: + with codecs.open('./README.rst', encoding='utf-8') as readme_rst: long_description = readme_rst.read() except IOError: # README.rst is only generated on release. Its absence should not prevent |