diff options
author | davidovski <david@davidovski.xyz> | 2022-01-12 23:08:00 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-01-12 23:08:00 +0000 |
commit | 64ce365acfbe4f617f18e2b1de26930fe3010bcd (patch) | |
tree | abbfbfdba4ae3917249bcd2386ccac6445c0c84a /src/verbs/sync.py | |
parent | 5a69440f668a5cc21e0508c38802f33843367ec5 (diff) |
fixed searching
Diffstat (limited to 'src/verbs/sync.py')
-rw-r--r-- | src/verbs/sync.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/verbs/sync.py b/src/verbs/sync.py index 53fcfb4..70adcd1 100644 --- a/src/verbs/sync.py +++ b/src/verbs/sync.py @@ -65,12 +65,20 @@ def validate_package(package, versions, repo, verbose=False): # change the packages dict to list all the sources # maybe some validation here - info = { - "checksum": most_popular.split()[0], - "size": most_popular.split()[1], - "files": most_popular.split()[2], - "sources" : sources - } + if len(most_popular.split()) > 2: + info = { + "checksum": most_popular.split()[0], + "size": most_popular.split()[1], + "files": most_popular.split()[2], + "sources" : sources + } + else: + info = { + "checksum": most_popular.split()[0], + "size": "0", + "files": "0", + "sources" : sources + } return info def save_package(package, info, location): |