forked from Minki/linux
tools/kvm_stat: Fix python3 syntax
$ python3 tools/kvm/kvm_stat/kvm_stat File "tools/kvm/kvm_stat/kvm_stat", line 1137 def sortkey((_k, v)): ^ SyntaxError: invalid syntax Fix it in a way that's compatible with python2 and python3 Signed-off-by: Cole Robinson <crobinso@redhat.com> Tested-by: Stefan Raspl <stefan.raspl@linux.vnet.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
8566ac8b8e
commit
6ade1ae84c
@ -1134,12 +1134,14 @@ class Tui(object):
|
||||
def get_sorted_events(self, stats):
|
||||
""" separate parent and child events """
|
||||
if self._sorting == SORT_DEFAULT:
|
||||
def sortkey((_k, v)):
|
||||
def sortkey(pair):
|
||||
# sort by (delta value, overall value)
|
||||
v = pair[1]
|
||||
return (v.delta, v.value)
|
||||
else:
|
||||
def sortkey((_k, v)):
|
||||
def sortkey(pair):
|
||||
# sort by overall value
|
||||
v = pair[1]
|
||||
return v.value
|
||||
|
||||
childs = []
|
||||
|
Loading…
Reference in New Issue
Block a user