[Python-3000-checkins] r57702 - python/branches/py3k/Lib/distutils/util.py

neal.norwitz python-3000-checkins at python.org
Thu Aug 30 07:35:41 CEST 2007


Author: neal.norwitz
Date: Thu Aug 30 07:35:41 2007
New Revision: 57702

Modified:
   python/branches/py3k/Lib/distutils/util.py
Log:
Stop using the find function on the string module, use the string method.
This will hopefully fix the problem on a Windows buildbot with test_sundry.



Modified: python/branches/py3k/Lib/distutils/util.py
==============================================================================
--- python/branches/py3k/Lib/distutils/util.py	(original)
+++ python/branches/py3k/Lib/distutils/util.py	Thu Aug 30 07:35:41 2007
@@ -39,14 +39,14 @@
     if os.name == 'nt':
         # sniff sys.version for architecture.
         prefix = " bit ("
-        i = string.find(sys.version, prefix)
+        i = sys.version.find(prefix)
         if i == -1:
             return sys.platform
-        j = string.find(sys.version, ")", i)
+        j = sys.version.find(")", i)
         look = sys.version[i+len(prefix):j].lower()
-        if look=='amd64':
+        if look == 'amd64':
             return 'win-x86_64'
-        if look=='itanium':
+        if look == 'itanium':
             return 'win-ia64'
         return sys.platform
 


More information about the Python-3000-checkins mailing list