diff options
| author | Ben Firshman <ben@firshman.co.uk> | 2016-11-28 14:37:34 +0000 |
|---|---|---|
| committer | Joffrey F <joffrey@docker.com> | 2016-12-07 16:34:53 -0800 |
| commit | d0758921ff7cd72c29f015f648f86651e6001012 (patch) | |
| tree | 75b98b1ca963656428bd36e9a3b15084c3173b65 | |
| parent | 24f3edf9a021b1331ec211db3afe8df6f030d0e7 (diff) | |
| download | docker-py-d0758921ff7cd72c29f015f648f86651e6001012.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>
| -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 |
