Commit 01940b0a authored by Mikaël Salson's avatar Mikaël Salson
Browse files compatibility with former Python3 versions

parent 6dd6c7ac
......@@ -85,19 +85,20 @@ def go(cmd, log=None):
flog = sys.stdout
print(cmd, end=' ')
start = resource.getrusage(resource.RUSAGE_CHILDREN)
completed =, shell=True, stderr=subprocess.STDOUT, stdout=flog)
returncode =, shell=True, stderr=subprocess.STDOUT, stdout=flog)
end = resource.getrusage(resource.RUSAGE_CHILDREN)
if log:
if completed.returncode:
if returncode:
print('FAILED', end=' ')
stime = end.ru_stime-start.ru_stime
utime = end.ru_utime-start.ru_utime
print('%5.2fu %5.2fs' % (utime, stime))
if returncode:
raise subprocess.CalledProcessError(returncode, cmd)
return stime + utime
......@@ -217,4 +218,4 @@ if __name__ == '__main__':
if args.benchmark:
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment