diff options
author | Michael W. Hudson <mwh@python.net> | 2002-02-22 13:55:28 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-02-22 13:55:28 (GMT) |
commit | dcaab1fb1b7cff3bfa05249e4fcc00a69948df2a (patch) | |
tree | 415e6edc394a1f1088220a008bdf9f614234f380 /Lib | |
parent | 45c44fbd0d147c7317f0ac02ccbac7e1efc95fef (diff) | |
download | cpython-dcaab1fb1b7cff3bfa05249e4fcc00a69948df2a.zip cpython-dcaab1fb1b7cff3bfa05249e4fcc00a69948df2a.tar.gz cpython-dcaab1fb1b7cff3bfa05249e4fcc00a69948df2a.tar.bz2 |
Backport theller's check-in of revision 1.45:
Make it 1.5.2 compatible again.
(I'm not sure how having symlinks around the repository interacts with
branches -- I'm going to tread carefully in here)
Diffstat (limited to 'Lib')
-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 |