diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-23 16:39:09 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-23 16:39:09 -0500 |
commit | 63f856f5797afb3497818820f038c00ed10c0518 (patch) | |
tree | 595198d1bc7b96f35a6fce9f07dab042bcfd66eb /setuptools/command/easy_install.py | |
parent | 5219786775784fe0f8c3742e37e1889ad2c2307f (diff) | |
download | external_python_setuptools-63f856f5797afb3497818820f038c00ed10c0518.tar.gz external_python_setuptools-63f856f5797afb3497818820f038c00ed10c0518.tar.bz2 external_python_setuptools-63f856f5797afb3497818820f038c00ed10c0518.zip |
Use sys.getfilesystemencoding for decoding bdist_wininst config. Fixes #114.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6ce19fa4..d329f4cb 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1373,10 +1373,9 @@ def extract_wininst_cfg(dist_filename): else: null_byte = chr(0) config = part.split(null_byte, 1)[0] - # Now the config is in bytes, but on Python 3, it must be - # unicode for the RawConfigParser, so decode it. Is this the - # right encoding? - config = config.decode('ascii') + # Now the config is in bytes, but for RawConfigParser, it should + # be text, so decode it. + config = config.decode(sys.getfilesystemencoding()) cfg.readfp(StringIO(config)) except ConfigParser.Error: return None |