From ab6b17e9efdab3efecae20d56237bfa09bed72ba Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 7 Dec 2021 19:11:58 +0000 Subject: fixed most popular reporting least popular --- src/verbs/sync.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/verbs') diff --git a/src/verbs/sync.py b/src/verbs/sync.py index 85e3623..38a8a39 100644 --- a/src/verbs/sync.py +++ b/src/verbs/sync.py @@ -47,12 +47,13 @@ def validate_package(package, versions, repo, verbose=False): popularity[checksum] = 0 popularity[checksum] += 1 - most_popular = sorted(popularity)[0] + most_popular = sorted(popularity)[-1] + sources = [v[1] for v in versions if v[0] == most_popular] # change the packages dict to list all the sources return { "checksum": most_popular, - "sources" : [v[1] for v in versions if v[0] == most_popular] + "sources" : sources } def save_package(package, info, location): -- cgit v1.2.1