summaryrefslogtreecommitdiff
path: root/src/verbs/sync.py
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2021-12-07 19:11:58 +0000
committerdavidovski <david@davidovski.xyz>2021-12-07 19:11:58 +0000
commitab6b17e9efdab3efecae20d56237bfa09bed72ba (patch)
tree348ac62fdd65d967a36884c37db00d04c62991c0 /src/verbs/sync.py
parentc7eb41091b9df6f08dbcaed38deca354fb797d50 (diff)
fixed most popular reporting least popular
Diffstat (limited to 'src/verbs/sync.py')
-rw-r--r--src/verbs/sync.py5
1 files changed, 3 insertions, 2 deletions
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):