From: Neal Norwitz Date: Thu, 30 Aug 2007 05:35:41 +0000 (+0000) Subject: Stop using the find function on the string module, use the string method. X-Git-Tag: v3.0a1~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cabac0ac3accbdfab390896aa77e3d8766ec947f;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 22a8ba23e82d..e0ae2e5ea27f 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -39,14 +39,14 @@ def get_platform (): 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