]> granicus.if.org Git - python/commitdiff
Bug #1478326: don't allow '/' in distutils.util.get_platform machine names
authorGeorg Brandl <georg@python.org>
Fri, 28 Apr 2006 16:58:52 +0000 (16:58 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 28 Apr 2006 16:58:52 +0000 (16:58 +0000)
since this value is used to name the build directory.

Lib/distutils/util.py

index 387e9bdc930042c0ce8c9cdf77a42da608e6b8b6..061092b6734bb9b929dae643fa4183b5c4a9cc5e 100644 (file)
@@ -45,6 +45,7 @@ def get_platform ():
     osname = string.lower(osname)
     osname = string.replace(osname, '/', '')
     machine = string.replace(machine, ' ', '_')
+    machine = string.replace(machine, '/', '-')
 
     if osname[:5] == "linux":
         # At least on Linux/Intel, 'machine' is the processor --