Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/237600

Change subject: Fix for breaking change of Page.templatesWithParams() at core 
branch
......................................................................

Fix for breaking change of Page.templatesWithParams() at core branch

Change-Id: I5c784d8c8fb247d335d1b166d5f2ad684c355fda
---
M checkvotes.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/xqbot 
refs/changes/00/237600/1

diff --git a/checkvotes.py b/checkvotes.py
index f826bce..8b4ae24 100644
--- a/checkvotes.py
+++ b/checkvotes.py
@@ -144,7 +144,8 @@
     if template:
         templates = page.templatesWithParams()
         for tmpl in templates:
-            if tmpl[0] == 'Meinungsbild-Box' or tmpl[0] == 'BSV-Box':
+            title = tmpl[0].title(withNamespace=False)
+            if title == 'Meinungsbild-Box' or title == 'BSV-Box':
                 d = {}
                 for x in tmpl[1]:
                     s = x.split('=')
@@ -653,7 +654,7 @@
         # We will only work on a single page.
         pageTitle = ' '.join(pageTitleParts)
         page = pywikibot.Page(pywikibot.Site(), pageTitle)
-        template = u'Meinungsbild' in pageTitle or \
+        template = 'Meinungsbild' in pageTitle or \
                    'Benutzersperrung' in pageTitle
         gen = iter([page])
 

-- 
To view, visit https://gerrit.wikimedia.org/r/237600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c784d8c8fb247d335d1b166d5f2ad684c355fda
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/xqbot
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to