jenkins-bot merged this change.
[bugfix] Don't fail when there is no parameter in doc template
Change-Id: I71a166a8cd3d4e9b2b47f39d7f60a6efd8583935
---
M scripts/category.py
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/category.py b/scripts/category.py
index b12b6ba..cf5c209 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -255,9 +255,10 @@
tmpl = [tmpl]
if tmpl != []:
templates = page.templatesWithParams()
- for template in templates:
- if template[0].title(withNamespace=False).lower() in tmpl:
- doc_page = pywikibot.Page(page.site, template[1])
+ for template, params in templates:
+ if (template.title(withNamespace=False).lower() in tmpl
+ and params):
+ doc_page = pywikibot.Page(page.site, params[0])
if doc_page.exists():
page = doc_page
includeonly = ['includeonly']
To view, visit change 433981. To unsubscribe, visit settings.