[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] noreferences.py: outputs & frwiki dict

2017-06-09 Thread jenkins-bot (Code Review)
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):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] noreferences.py: outputs & frwiki dict

2017-06-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
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, 12 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/61/358061/1

diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 604cc17..712cb0e 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,7 +645,7 @@
 try:
 text = page.text
 except pywikibot.NoPage:
-pywikibot.output(u"Page %s does not exist?!"
+pywikibot.warning('Page %s does not exist?!'
  % page.title(asLink=True))
 continue
 except pywikibot.IsRedirectPage:
@@ -652,7 +653,7 @@
  % page.title(asLink=True))
 continue
 except pywikibot.LockedPage:
-pywikibot.output(u"Page %s is locked?!"
+pywikibot.warning('Page %s is locked?!'
  % page.title(asLink=True))
 continue
 if page.isDisambig():
@@ -660,7 +661,7 @@
  % 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):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 

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