software ramp mixin
+ fix frappy.lib.merge_status Change-Id: I550eaeaab460a0d9ac1b027d59d4223dac4c0663
This commit is contained in:
@@ -405,4 +405,8 @@ def merge_status(*args):
|
||||
texts matching maximal code are joined with ', '
|
||||
"""
|
||||
maxcode = max(a[0] for a in args)
|
||||
return maxcode, ', '.join([a[1] for a in args if a[0] == maxcode and a[1]])
|
||||
# take status value matching highest status code
|
||||
merged = [a[1] for a in args if a[0] == maxcode and a[1]]
|
||||
# merge the split texts. use dict instead of set for keeping order
|
||||
merged = {m: 0 for mm in merged for m in mm.split(', ')}
|
||||
return maxcode, ', '.join(merged)
|
||||
|
||||
Reference in New Issue
Block a user