From: Andrew M. Kuchling Date: Wed, 26 Feb 2003 22:26:03 +0000 (+0000) Subject: Backport rev. 1.73: Translate spaces in the machine name to underscores X-Git-Tag: v2.2.3c1~120 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e4822490753f67ba5d4ab589e46eeb94fe14d9e;p=thirdparty%2FPython%2Fcpython.git Backport rev. 1.73: Translate spaces in the machine name to underscores --- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index abc91391e415..4792dae0d25b 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 --