[search] Always return headers in the same order (RhBug:1613860)

This commit is contained in:
Daniel Mach 2019-03-01 17:10:04 +01:00
parent 6c45861ad7
commit eb9282eb54
1 changed files with 7 additions and 1 deletions

View File

@ -102,7 +102,13 @@ class MatchCounter(dict):
return set(getattr(pkg, m[0]) for m in self[pkg])
def matched_keys(self, pkg):
return set(m[0] for m in self[pkg])
# return keys in the same order they appear in the list
result = []
for i in self[pkg]:
if i[0] in result:
continue
result.append(i[0])
return result
def matched_needles(self, pkg):
return set(m[1] for m in self[pkg])