diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-17 11:46:54 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-17 11:46:54 (GMT) |
commit | d157e6977784c9483bdffc5d8ccd108c3cd4f94f (patch) | |
tree | 30452d2a83758b71053c346055765c31ce8f7d96 /Lib | |
parent | ad14d11a5ed34ed8b82636e876246de181c8de3d (diff) | |
download | cpython-d157e6977784c9483bdffc5d8ccd108c3cd4f94f.zip cpython-d157e6977784c9483bdffc5d8ccd108c3cd4f94f.tar.gz cpython-d157e6977784c9483bdffc5d8ccd108c3cd4f94f.tar.bz2 |
The _winreg module returns bytes which must be decoded to unicode, not encoded.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/msvccompiler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index d239057..6bf969f 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -93,10 +93,10 @@ def read_values(base, key): return d def convert_mbcs(s): - enc = getattr(s, "encode", None) - if enc is not None: + dec = getattr(s, "decode", None) + if dec is not None: try: - s = enc("mbcs") + s = dec("mbcs") except UnicodeError: pass return s |