Author: Antonio Cuni <[email protected]>
Branch: 
Changeset: r135:3211debf47b0
Date: 2011-07-25 17:20 +0200
http://bitbucket.org/pypy/benchmarks/changeset/3211debf47b0/

Log:    bah, fix for python2.6 which does not have subprocess.check_output

diff --git a/benchmarks.py b/benchmarks.py
--- a/benchmarks.py
+++ b/benchmarks.py
@@ -118,13 +118,15 @@
     translate_py = relative('lib/pypy/pypy/translator/goal/translate.py')
     #targetnop = 
relative('lib/pypy/pypy/translator/goal/targetnopstandalone.py')
     args = base_python + [translate_py, '--source', '--dont-write-c-files']
-    try:
-        output = subprocess.check_output(args, stderr=subprocess.STDOUT)
-    except subprocess.CalledProcessError, e:
-        print e.output
-        raise
+    proc = subprocess.Popen(args, stderr=subprocess.PIPE)
+    out, err = proc.communicate()
+    retcode = proc.poll()
+    if retcode != 0:
+        print out
+        print err
+        raise Exception("translate.py failed")
 
-    lines = output.splitlines()
+    lines = err.splitlines()
     timings = parse_timer(lines)
 
     result = []
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to