Fix call to sorted.sort for Python 3

This commit is contained in:
Valentin Lorentz 2019-02-19 22:49:02 +01:00 committed by GitHub
parent 477f457254
commit 0fc85014d1
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ class Trivia(callbacks.Plugin):
sorted.append(item)
def cmp(a, b):
return b[1] - a[1]
sorted.sort(cmp)
sorted.sort(key=lambda item: item[1], reverse=True)
max = 3
if len(sorted) < max:
max = len(sorted)