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


--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/226984
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I72d0bc3479d47b7d70dc5e28415f8e337cf9cd17
Gerrit-Change-Number: 226984
Gerrit-PatchSet: 2
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: Avicennasis <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to