[Distutils] Another string-method call in distutils

Thomas Heller thomas.heller@ion-tof.com
Wed Feb 6 08:31:12 2002


Another recent change which doesn_t run in 1.5.2, and a proposed patch:

Thomas

Index: msvccompiler.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/msvccompiler.py,v
retrieving revision 1.44
diff -c -r1.44 msvccompiler.py
*** msvccompiler.py 2002/01/29 10:23:42 1.44
--- msvccompiler.py 2002/02/06 13:22:11
***************
*** 117,126 ****
                      if string.upper(p) == path:
                          V = string.split(v,';')
                          for v in V:
!                             try:
!                                 v = v.encode("mbcs")
!                             except UnicodeError:
!                                 pass
                              if v == '' or v in L: continue
                              L.append(v)
                          break
--- 117,127 ----
                      if string.upper(p) == path:
                          V = string.split(v,';')
                          for v in V:
!                             if hasattr(v, "encode"):
!                                 try:
!                                     v = v.encode("mbcs")
!                                 except UnicodeError:
!                                     pass
                              if v == '' or v in L: continue
                              L.append(v)
                          break