Author: christian.heimes
Date: Sat Nov 17 12:46:54 2007
New Revision: 59036
Modified:
python/branches/py3k/Lib/distutils/msvccompiler.py
Log:
The _winreg module returns bytes which must be decoded to unicode, not encoded.
Modified: python/branches/py3k/Lib/distutils/msvccompiler.py
==============================================================================
--- python/branches/py3k/Lib/distutils/msvccompiler.py (original)
+++ python/branches/py3k/Lib/distutils/msvccompiler.py Sat Nov 17 12:46:54 2007
@@ -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
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins