summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2019-10-05 00:16:05 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2019-10-05 02:08:08 +0200
commit74145ccf0731cf39d57d092bb832884f6ef47ba5 (patch)
tree98b2fa5b5c1ec6dd94cb4c08341b66c091e152e3 /bin
parentf6ddb203a74cf3373df15636cf9ac2973abdca66 (diff)
bin/find-most-common-warn-messages.py: Switch to python3
python2 is nearing its EOL. (The new version still runs fine with python2 if explicitly called as 'python2 bin/find-most-common-warn-messages.py'). Change-Id: I1153a3e468a7f36c299767a32f683b84efa8af04 Reviewed-on: https://gerrit.libreoffice.org/80286 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-most-common-warn-messages.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/find-most-common-warn-messages.py b/bin/find-most-common-warn-messages.py
index 4686a5994519..dc2ecf8ab014 100755
--- a/bin/find-most-common-warn-messages.py
+++ b/bin/find-most-common-warn-messages.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# A script to search our test logs and sort the messages by how common they are so we can start to
# reduce the noise a little.
@@ -28,11 +28,11 @@ for line in process.stdout:
sampleOfMessage[sourceAndLine] = line[line.find(tokens[6]):]
tmplist = list() # set of tuple (count, sourceAndLine)
-for key, value in messages.iteritems():
+for key, value in messages.items():
tmplist.append([value,key])
print( "The top 20 warnings" )
-print
+print("")
for i in sorted(tmplist, key=lambda v: v[0])[-20:]:
print( "%6d %s %s" % (i[0], i[1], sampleOfMessage[i[1]]) )