jenkins-bot has submitted this change and it was merged.

Change subject: expand wikicode in 'Cite_error_refs_without_references_category'
......................................................................


expand wikicode in 'Cite_error_refs_without_references_category'

The English Wikipedia version of the message invokes a Scribunto
module, thus making noreferences.py fail with pywikibot.InvalidTitle
(because of the curly brackets in it) when called with no arguments:
https://travis-ci.org/wikimedia/pywikibot-core/jobs/31712965

Ideally, the 'amenableparser' argument should be passed to the
allmessages API, but APISite.mediawiki_messages() doesn't have this
feature yet.

Change-Id: I88b4beeec0bc64e2586a6165bf6ae9d70522db5d
---
M scripts/noreferences.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index e92ac82..718a47d 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -678,7 +678,8 @@
     if not gen:
         site = pywikibot.Site()
         try:
-            cat = site.mediawiki_message(maintenance_category)
+            cat = site.expand_text(
+                site.mediawiki_message(maintenance_category))
         except:
             pass
         else:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88b4beeec0bc64e2586a6165bf6ae9d70522db5d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to