From: Andrew M. Kuchling Date: Mon, 6 Jan 2003 13:28:12 +0000 (+0000) Subject: Translate spaces in the machine name to underscores X-Git-Tag: v2.3c1~2572 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8c7b9f0ccb3073afba15bbcc68c1ada12a538bf;p=python Translate spaces in the machine name to underscores (Power Macintosh -> Power_Macintosh) --- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 17fc320aa6..dc3183b691 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -40,10 +40,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 --