diff options
author | Jeffrey Yasskin <jyasskin@gmail.com> | 2008-03-08 21:35:15 (GMT) |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@gmail.com> | 2008-03-08 21:35:15 (GMT) |
commit | 3accbb0729524210b330a22b0a71c8aca1ae038a (patch) | |
tree | 4cb253277e1d803ee5ebe65f6eecc71fb04aa28c /Tools | |
parent | 019e9d730a0f4fa1ae5f4c68950680e5a6866169 (diff) | |
download | cpython-3accbb0729524210b330a22b0a71c8aca1ae038a.zip cpython-3accbb0729524210b330a22b0a71c8aca1ae038a.tar.gz cpython-3accbb0729524210b330a22b0a71c8aca1ae038a.tar.bz2 |
Well that was dumb. platform.python_implementation returns a function, not a
string.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/pybench/pybench.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/pybench/pybench.py b/Tools/pybench/pybench.py index b4982fb..e1bc95d 100755 --- a/Tools/pybench/pybench.py +++ b/Tools/pybench/pybench.py @@ -121,7 +121,8 @@ def get_machine_details(): 'platform': platform.platform(), 'processor': platform.processor(), 'executable': sys.executable, - 'implementation': getattr(platform, 'python_implementation', 'n/a'), + 'implementation': getattr(platform, 'python_implementation', + lambda:'n/a')(), 'python': platform.python_version(), 'compiler': platform.python_compiler(), 'buildno': buildno, @@ -837,7 +838,7 @@ python pybench.py -s p25.pybench -c p21.pybench print 'PYBENCH %s' % __version__ print '-' * LINE print '* using %s %s' % ( - getattr(platform, 'python_implementation', 'Python'), + getattr(platform, 'python_implementation', lambda:'Python')(), string.join(string.split(sys.version), ' ')) # Switch off garbage collection |