From 2013cd2889df484efbfb106fea38085bfbb0315c Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sun, 28 Oct 2018 10:48:42 +1300 Subject: [PATCH] script/show_test_time: attempt py3 compat Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- script/show_test_time | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/show_test_time b/script/show_test_time index a35e2154275..fae7b814f49 100755 --- a/script/show_test_time +++ b/script/show_test_time @@ -26,7 +26,7 @@ if 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)): + durations.items(), key=lambda x: x[1], reverse=True)): if opts.limit and i == opts.limit: break print("%d: %s -> %ds" % (i+1, name, length))