jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/226984 )
Change subject: Fix skip page template parameter check ......................................................................
Fix skip page template parameter check
Bug: T106952 Change-Id: I72d0bc3479d47b7d70dc5e28415f8e337cf9cd17 --- M scripts/commonscat.py 1 file changed, 13 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/commonscat.py b/scripts/commonscat.py index d01b6e4..6820d58 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -266,9 +266,10 @@ if pageTemplate.title(with_ns=False) == template: return True else: - for (inPageTemplate, param) in page.templatesWithParams(): + for inPageTemplate, params in page.templatesWithParams(): if inPageTemplate.title(with_ns=False) == template[0] \ - and template[1] in param[0].replace(' ', ''): + and any(template[1] in param.replace(' ', '') + for param in params): return True return False
pywikibot-commits@lists.wikimedia.org