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.
This commit is contained in:
parent
028ceca90d
commit
065d3a64fc
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue