aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-08-12 15:48:52 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-08-12 15:48:52 -0400
commit02d020c07386189b9ed98ee39c60106aeb91ec81 (patch)
treec740236382ccd227e2ff2461c684282d27d42054
parented04235f545521351297f9d084335b59d870708d (diff)
downloadgrokmirror-02d020c07386189b9ed98ee39c60106aeb91ec81.tar.gz
Set default boost to 1 when boosts are used
Make the configuration file more consistent when using boost values for specific list-ids. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--grokmirror/pi_indexer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/grokmirror/pi_indexer.py b/grokmirror/pi_indexer.py
index 5bb0350..eff5e7b 100644
--- a/grokmirror/pi_indexer.py
+++ b/grokmirror/pi_indexer.py
@@ -129,10 +129,12 @@ def init_pi_inbox(gdir: str, pdir: str, opts) -> bool:
if opt == 'listid' and boosts:
listid = val
# Calculate the boost value
+ boostval = 1
for patt in boosts:
if fnmatch(val, patt):
- extraopts.append(('boost', str(boosts.index(patt) + 1)))
+ boostval = boosts.index(patt) + 10
break
+ extraopts.append(('boost', str(boostval)))
if opt not in {'infourl', 'listid'}:
continue