summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/msvccompiler.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-17 11:46:54 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-17 11:46:54 (GMT)
commitd157e6977784c9483bdffc5d8ccd108c3cd4f94f (patch)
tree30452d2a83758b71053c346055765c31ce8f7d96 /Lib/distutils/msvccompiler.py
parentad14d11a5ed34ed8b82636e876246de181c8de3d (diff)
downloadcpython-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/distutils/msvccompiler.py')
-rw-r--r--Lib/distutils/msvccompiler.py6
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