]> granicus.if.org Git - python/commitdiff
Fix pybench for pythons < 2.6, tested back to 2.3.
authorJeffrey Yasskin <jyasskin@gmail.com>
Sat, 8 Mar 2008 20:08:21 +0000 (20:08 +0000)
committerJeffrey Yasskin <jyasskin@gmail.com>
Sat, 8 Mar 2008 20:08:21 +0000 (20:08 +0000)
Tools/pybench/pybench.py

index 40533c2f4166a0a4d1c19db7c59eaba6522211c9..b4982fbd18f21f22c5a9835595e17dc41ce77968 100755 (executable)
@@ -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