From: Andrew M. Kuchling Date: Tue, 27 Feb 2001 19:25:42 +0000 (+0000) Subject: Bug #229280: remove '/' characters from the OS name (for BSD/OS :) ) X-Git-Tag: v2.1b1~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83c158fdc9d9acb737172a1a365014514afd4fc9;p=python Bug #229280: remove '/' characters from the OS name (for BSD/OS :) ) --- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 009ba6cb93..e596150422 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -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.