diff options
author | Thomas Heller <theller@ctypes.org> | 2002-02-08 14:41:31 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2002-02-08 14:41:31 (GMT) |
commit | 745b4609cb932a493033b1b7d7e851716ac8e413 (patch) | |
tree | 9b4c82a85ad02ecddf0d8cf3d7016f2187320cc7 /Lib/distutils | |
parent | bd3be8f0ca4fd70d53d9330489ba565f83530b3b (diff) | |
download | cpython-745b4609cb932a493033b1b7d7e851716ac8e413.zip cpython-745b4609cb932a493033b1b7d7e851716ac8e413.tar.gz cpython-745b4609cb932a493033b1b7d7e851716ac8e413.tar.bz2 |
Make it 1.5.2 compatible again.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/msvccompiler.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 3533664..79a4901 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 |