Skip to content

Commit 7a85efb

Browse files
authored
Merge pull request #294 from neirbowj/explicit_encoding
Use ASCII decoding explicitly in setup.py
2 parents 01c7b64 + f690a2b commit 7a85efb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from __future__ import with_statement
55

6+
from io import open
67
import os
78
import re
89
try:
@@ -14,8 +15,9 @@
1415
NAME = 'colorama'
1516

1617

17-
def read_file(path):
18-
with open(os.path.join(os.path.dirname(__file__), path)) as fp:
18+
def read_file(path, encoding='ascii'):
19+
with open(os.path.join(os.path.dirname(__file__), path),
20+
encoding=encoding) as fp:
1921
return fp.read()
2022

2123
def _get_version_match(content):

0 commit comments

Comments
 (0)