jenkins-bot has submitted this change and it was merged. Change subject: (bug 57164) ignore disambig pages ......................................................................
(bug 57164) ignore disambig pages Change-Id: I8eb4bc4fa8a70ed98041dd7f080bd15ab7786312 --- M scripts/noreferences.py 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/noreferences.py b/scripts/noreferences.py index e3f556a..fc8d4f3 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -34,7 +34,7 @@ a list of affected articles """ # -# (C) Pywikibot team, 2013 +# (C) Pywikibot team, 2007-2013 # # Distributed under the terms of the MIT license. # @@ -436,6 +436,8 @@ self.generator = generator self.always = always self.site = pywikibot.getSite() + self.comment = i18n.twtranslate(self.site, 'noreferences-add-tag') + self.refR = re.compile('</ref>', re.IGNORECASE) self.referencesR = re.compile('<references.*?/>', re.IGNORECASE) self.referencesTagR = re.compile('<references>.*?</references>', @@ -599,7 +601,7 @@ if self.always: try: - page.put(newText) + page.put(newText, self.comment) except pywikibot.EditConflict: pywikibot.output(u'Skipping %s because of edit conflict' % (page.title(),)) @@ -611,12 +613,10 @@ pywikibot.output(u'Skipping %s (locked page)' % (page.title(),)) else: # Save the page in the background. No need to catch exceptions. - page.put_async(newText) + page.put_async(newText, self.comment) return def run(self): - comment = i18n.twtranslate(self.site, 'noreferences-add-tag') - pywikibot.setAction(comment) for page in self.generator: # Show the title of the page we're working on. @@ -637,6 +637,10 @@ pywikibot.output(u"Page %s is locked?!" % page.title(asLink=True)) continue + if page.isDisambig(): + pywikibot.output(u"Page %s is a disambig; skipping." + % page.title(asLink=True)) + continue if pywikibot.getSite().sitename() == 'wikipedia:en' and \ page.isIpEdit(): pywikibot.output( -- To view, visit https://gerrit.wikimedia.org/r/104044 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8eb4bc4fa8a70ed98041dd7f080bd15ab7786312 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Pyfisch <pyfi...@googlemail.com> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits