mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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.
This commit is contained in:
parent
0c3842fe26
commit
cabac0ac3a
1 changed files with 4 additions and 4 deletions
|
@ -39,14 +39,14 @@ def get_platform ():
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
# sniff sys.version for architecture.
|
# sniff sys.version for architecture.
|
||||||
prefix = " bit ("
|
prefix = " bit ("
|
||||||
i = string.find(sys.version, prefix)
|
i = sys.version.find(prefix)
|
||||||
if i == -1:
|
if i == -1:
|
||||||
return sys.platform
|
return sys.platform
|
||||||
j = string.find(sys.version, ")", i)
|
j = sys.version.find(")", i)
|
||||||
look = sys.version[i+len(prefix):j].lower()
|
look = sys.version[i+len(prefix):j].lower()
|
||||||
if look=='amd64':
|
if look == 'amd64':
|
||||||
return 'win-x86_64'
|
return 'win-x86_64'
|
||||||
if look=='itanium':
|
if look == 'itanium':
|
||||||
return 'win-ia64'
|
return 'win-ia64'
|
||||||
return sys.platform
|
return sys.platform
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue