jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/358061 )
Change subject: [IMPR] noreferences.py: outputs & frwiki dict ......................................................................
[IMPR] noreferences.py: outputs & frwiki dict
Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823 --- M scripts/noreferences.py 1 file changed, 14 insertions(+), 12 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/scripts/noreferences.py b/scripts/noreferences.py index 604cc17..ec98b79 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -34,7 +34,7 @@ a list of affected articles """ # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2017 # # Distributed under the terms of the MIT license. # @@ -287,7 +287,8 @@ u'Notes et références', u'Références', u'References', - u'Notes' + 'Notes', + 'Sources', ], 'he': [ u'הערות שוליים', @@ -644,23 +645,23 @@ try: text = page.text except pywikibot.NoPage: - pywikibot.output(u"Page %s does not exist?!" - % page.title(asLink=True)) + pywikibot.warning('Page %s does not exist?!' + % page.title(asLink=True)) continue except pywikibot.IsRedirectPage: pywikibot.output(u"Page %s is a redirect; skipping." % page.title(asLink=True)) continue except pywikibot.LockedPage: - pywikibot.output(u"Page %s is locked?!" - % page.title(asLink=True)) + pywikibot.warning('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 self.site.sitename == 'wikipedia:en' and page.isIpEdit(): - pywikibot.output( + pywikibot.warning( u"Page %s is edited by IP. Possible vandalized" % page.title(asLink=True)) continue @@ -669,14 +670,15 @@ try: self.userPut(page, page.text, newText, summary=self.comment) except pywikibot.EditConflict: - pywikibot.output(u'Skipping %s because of edit conflict' - % page.title()) + pywikibot.warning('Skipping %s because of edit conflict' + % page.title(asLink=True)) except pywikibot.SpamfilterError as e: - pywikibot.output( + pywikibot.warning( u'Cannot change %s because of blacklist entry %s' - % (page.title(), e.url)) + % (page.title(asLink=True), e.url)) except pywikibot.LockedPage: - pywikibot.output(u'Skipping %s (locked page)' % page.title()) + pywikibot.warning('Skipping %s (locked page)' % + page.title(asLink=True))
def main(*args):
pywikibot-commits@lists.wikimedia.org