summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-02-26 22:26:03 +0000
committerAndrew M. Kuchling <amk@amk.ca>2003-02-26 22:26:03 +0000
commit4e4822490753f67ba5d4ab589e46eeb94fe14d9e (patch)
treec7633d47133c89ba56515d3ef0d6c7eb97df69b3 /Lib
parent427ee3bbddbc8bd8b22868c24c96123728f15889 (diff)
downloadcpython-git-4e4822490753f67ba5d4ab589e46eeb94fe14d9e.tar.gz
Backport rev. 1.73: Translate spaces in the machine name to underscores
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index abc91391e4..4792dae0d2 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -42,10 +42,11 @@ def get_platform ():
(osname, host, release, version, machine) = os.uname()
- # Convert the OS name to lowercase and remove '/' characters
- # (to accommodate BSD/OS)
+ # Convert the OS name to lowercase, remove '/' characters
+ # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
osname = string.lower(osname)
osname = string.replace(osname, '/', '')
+ machine = string.replace(machine, ' ', '_')
if osname[:5] == "linux":
# At least on Linux/Intel, 'machine' is the processor --