summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-03-08 20:08:21 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-03-08 20:08:21 (GMT)
commit019e9d730a0f4fa1ae5f4c68950680e5a6866169 (patch)
treedf9e977a207355ed92ca11e9c4c5fc8385989c37 /Tools
parent0df0f6d1b296e618a6bc5dc5a38fa1f2b391a5ef (diff)
downloadcpython-019e9d730a0f4fa1ae5f4c68950680e5a6866169.zip
cpython-019e9d730a0f4fa1ae5f4c68950680e5a6866169.tar.gz
cpython-019e9d730a0f4fa1ae5f4c68950680e5a6866169.tar.bz2
Fix pybench for pythons < 2.6, tested back to 2.3.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/pybench/pybench.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/pybench/pybench.py b/Tools/pybench/pybench.py
index 40533c2..b4982fb 100755
--- a/Tools/pybench/pybench.py
+++ b/Tools/pybench/pybench.py
@@ -121,7 +121,7 @@ def get_machine_details():
'platform': platform.platform(),
'processor': platform.processor(),
'executable': sys.executable,
- 'implementation': platform.python_implementation(),
+ 'implementation': getattr(platform, 'python_implementation', 'n/a'),
'python': platform.python_version(),
'compiler': platform.python_compiler(),
'buildno': buildno,
@@ -837,7 +837,7 @@ python pybench.py -s p25.pybench -c p21.pybench
print 'PYBENCH %s' % __version__
print '-' * LINE
print '* using %s %s' % (
- platform.python_implementation(),
+ getattr(platform, 'python_implementation', 'Python'),
string.join(string.split(sys.version), ' '))
# Switch off garbage collection