mirror of
https://gitlab.com/khumba/nvd.git
synced 2024-11-14 17:09:27 +01:00
Fall back to sorting by name, if all else is equal.
This commit is contained in:
parent
02a8e4911a
commit
4ae4ae9fae
1 changed files with 4 additions and 1 deletions
5
src/nvd
5
src/nvd
|
@ -500,7 +500,10 @@ class PackageListEntryCombinedComparator(PackageListEntryComparator):
|
||||||
if result != 0:
|
if result != 0:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
return 0
|
# Fall back to applying the default sort, if none of the requested
|
||||||
|
# comparators have found any difference. Without this, packages may
|
||||||
|
# appear in nondeterministic order.
|
||||||
|
return DEFAULT_SORT.cmp_packages(a, b)
|
||||||
|
|
||||||
def reversed(self) -> PackageListEntryComparator:
|
def reversed(self) -> PackageListEntryComparator:
|
||||||
return PackageListEntryCombinedComparator(c.reversed() for c in self._comparators)
|
return PackageListEntryCombinedComparator(c.reversed() for c in self._comparators)
|
||||||
|
|
Loading…
Reference in a new issue