commit | d157e6977784c9483bdffc5d8ccd108c3cd4f94f | [log] [tgz] |
---|---|---|
author | Christian Heimes <christian@cheimes.de> | Sat Nov 17 11:46:54 2007 +0000 |
committer | Christian Heimes <christian@cheimes.de> | Sat Nov 17 11:46:54 2007 +0000 |
tree | 30452d2a83758b71053c346055765c31ce8f7d96 | |
parent | ad14d11a5ed34ed8b82636e876246de181c8de3d [diff] [blame] |
The _winreg module returns bytes which must be decoded to unicode, not encoded.
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 @@ 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