mirror of
https://github.com/python/cpython.git
synced 2025-12-10 19:10:59 +00:00
Tweaked 'get_platform()' to include the first character of the OS release:
eg. sunos5, linux2, irix5.
This commit is contained in:
parent
7d51034eef
commit
6ce00b4440
1 changed files with 2 additions and 4 deletions
|
|
@ -545,10 +545,8 @@ def get_platform ():
|
||||||
i.e. "???" or "???"."""
|
i.e. "???" or "???"."""
|
||||||
|
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
uname = os.uname()
|
(OS, _, rel, _, arch) = os.uname()
|
||||||
OS = uname[0]
|
return "%s%c-%s" % (string.lower (OS), rel[0], string.lower (arch))
|
||||||
arch = uname[4]
|
|
||||||
return "%s-%s" % (string.lower (OS), string.lower (arch))
|
|
||||||
else:
|
else:
|
||||||
return sys.platform
|
return sys.platform
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue