summaryrefslogtreecommitdiff
path: root/Lib/distutils/msvccompiler.py
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2002-02-08 14:41:31 +0000
committerThomas Heller <theller@ctypes.org>2002-02-08 14:41:31 +0000
commit4722259ff31f13ef2032594d78038f84f63e3677 (patch)
tree77cc62f2139d9bb8615fac37ce33ac4fb4d9e646 /Lib/distutils/msvccompiler.py
parentdf55309a79b8aaa39d64aa50c4f7db2fb15250ee (diff)
downloadcpython-4722259ff31f13ef2032594d78038f84f63e3677.tar.gz
Make it 1.5.2 compatible again.
Diffstat (limited to 'Lib/distutils/msvccompiler.py')
-rw-r--r--Lib/distutils/msvccompiler.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py
index 35336642ae..79a4901bea 100644
--- a/Lib/distutils/msvccompiler.py
+++ b/Lib/distutils/msvccompiler.py
@@ -117,10 +117,11 @@ def get_msvc_paths (path, version='6.0', platform='x86'):
if string.upper(p) == path:
V = string.split(v,';')
for v in V:
- try:
- v = v.encode("mbcs")
- except UnicodeError:
- pass
+ if hasattr(v, "encode"):
+ try:
+ v = v.encode("mbcs")
+ except UnicodeError:
+ pass
if v == '' or v in L: continue
L.append(v)
break