mirror of
https://github.com/python/cpython.git
synced 2024-12-02 06:14:49 +08:00
Bug #229280: remove '/' characters from the OS name (for BSD/OS :) )
This commit is contained in:
parent
a34dbe0fdc
commit
83c158fdc9
@ -41,7 +41,12 @@ def get_platform ():
|
||||
# Try to distinguish various flavours of Unix
|
||||
|
||||
(osname, host, release, version, machine) = os.uname()
|
||||
osname = string.lower(osname)
|
||||
|
||||
# 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":
|
||||
# At least on Linux/Intel, 'machine' is the processor --
|
||||
# i386, etc.
|
||||
|
Loading…
Reference in New Issue
Block a user