Merge "Fix search of max sequence number"

This commit is contained in:
Zuul 2019-11-11 01:08:00 +00:00 committed by Gerrit Code Review
commit 02af18d5dc

View File

@ -619,7 +619,8 @@ def get_nodes_with_highest_seqno():
key = keyitems[0]
node = keyitems[1]
if key == 'seqno':
seqnos[node] = value
#Explicit casting to integer to have resulting list of integers for correct comparison
seqnos[node] = int(value)
max_seqno = max(seqnos.values())
max_seqno_nodes = sorted([k for k, v in list(seqnos.items()) if v == max_seqno])
return max_seqno_nodes