[Python-checkins] python/dist/src/Lib/distutils util.py,1.65.6.1,1.65.6.2

akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Wed, 26 Feb 2003 14:26:11 -0800


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1:/tmp/cvs-serv32054

Modified Files:
      Tag: release22-maint
	util.py 
Log Message:
Backport rev. 1.73: Translate spaces in the machine name to underscores

Index: util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/util.py,v
retrieving revision 1.65.6.1
retrieving revision 1.65.6.2
diff -C2 -d -r1.65.6.1 -r1.65.6.2
*** util.py	13 Aug 2002 17:49:18 -0000	1.65.6.1
--- util.py	26 Feb 2003 22:26:03 -0000	1.65.6.2
***************
*** 43,50 ****
      (osname, host, release, version, machine) = os.uname()
  
!     # Convert the OS name to lowercase and remove '/' characters
!     # (to accommodate BSD/OS)
      osname = string.lower(osname)
      osname = string.replace(osname, '/', '')
  
      if osname[:5] == "linux":
--- 43,51 ----
      (osname, host, release, version, machine) = os.uname()
  
!     # Convert the OS name to lowercase, remove '/' characters
!     # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
      osname = string.lower(osname)
      osname = string.replace(osname, '/', '')
+     machine = string.replace(machine, ' ', '_')
  
      if osname[:5] == "linux":