jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[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.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I71a166a8cd3d4e9b2b47f39d7f60a6efd8583935
Gerrit-Change-Number: 433981
Gerrit-PatchSet: 2
Gerrit-Owner: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot <>