Skip to content
Snippets Groups Projects
Commit 065d3a64 authored by David Douard's avatar David Douard
Browse files

Fix SWHIndexingLister.db_partition_indices(); ensure partition size is not zero

when this lister is called for the first time, db_num_entries() may return
a null value, so the min() will also be zero, making the range() call crash.
parent 028ceca9
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,7 @@ class SWHIndexingLister(SWHListerBase):
declare approximately equal-sized ranges of existing
repos
"""
n = self.db_num_entries()
n = max(self.db_num_entries(), 10)
partitions = []
partition_size = min(partition_size, n)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment