diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-10-11 16:04:38 +1300 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-10-25 21:45:58 +0200 |
commit | cd5ac17654467531e2dde85a738c5a170277f841 (patch) | |
tree | b34a7dfe49fcad784135e502953dda03b0d59023 /script/show_test_time | |
parent | 159fdcb6010020b06e5a55b66c3e72071183152d (diff) | |
download | samba-cd5ac17654467531e2dde85a738c5a170277f841.tar.gz |
script/show_test_time: approach python 3 compatibility
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'script/show_test_time')
-rwxr-xr-x | script/show_test_time | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/show_test_time b/script/show_test_time index 81bb7932a4a..a35e2154275 100755 --- a/script/show_test_time +++ b/script/show_test_time @@ -1,5 +1,5 @@ #!/usr/bin/python - +from __future__ import print_function import optparse import os.path import subprocess @@ -23,10 +23,10 @@ for l in p.stdout: durations[name] = float(duration) if opts.limit: - print "Top %d tests by run time:" % opts.limit + print("Top %d tests by run time:" % opts.limit) for i, (name, length) in enumerate(sorted( durations.items(), cmp=lambda (k1,v1), (k2, v2): cmp(v1, v2), reverse=True)): if opts.limit and i == opts.limit: break - print "%d: %s -> %ds" % (i+1, name, length) + print("%d: %s -> %ds" % (i+1, name, length)) |