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

Change subject: Use pywikibot.warning
......................................................................


Use pywikibot.warning

Change-Id: I0102c09d3550adace905cca0a50922e23adda8f5
---
M scripts/interwiki.py
M scripts/maintenance/wikimedia_sites.py
2 files changed, 14 insertions(+), 14 deletions(-)

Approvals:
  Lokal Profil: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 3504c59..4d1dc29 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -1299,8 +1299,8 @@
                 dictName, year = page.autoFormat()
                 if dictName is not None:
                     if self.originPage:
-                        pywikibot.output(
-                            u'WARNING: %s:%s relates to %s:%s, which is an '
+                        pywikibot.warning(
+                            '%s:%s relates to %s:%s, which is an '
                             u'auto entry %s(%s)'
                             % (self.originPage.site.lang, self.originPage,
                                page.site.lang, page, dictName, year))
@@ -1873,8 +1873,8 @@
                     unicode(rmPage) not in globalvar.remove
                 ):
                     new[rmsite] = rmPage
-                    pywikibot.output(
-                        'WARNING: %s is either deleted or has a mismatching '
+                    pywikibot.warning(
+                        '%s is either deleted or has a mismatching '
                         'disambiguation state.'
                         % rmPage)
             # Re-Check what needs to get done
@@ -2017,8 +2017,8 @@
                     try:
                         linkedPages = set(pywikibot.Page(l) for l in 
page.iterlanglinks())
                     except pywikibot.NoPage:
-                        pywikibot.output(
-                            u"WARNING: Page %s does no longer exist?!" % page)
+                        pywikibot.warning(
+                            'Page %s does no longer exist?!' % page)
                         break
                     # To speed things up, create a dictionary which maps sites
                     # to pages. This assumes that there is only one interwiki
@@ -2030,14 +2030,14 @@
                         if expectedPage != page:
                             try:
                                 linkedPage = linkedPagesDict[expectedPage.site]
-                                pywikibot.output(
-                                    u"WARNING: %s: %s does not link to %s but 
to %s"
+                                pywikibot.warning(
+                                    '%s: %s does not link to %s but to %s'
                                     % (page.site.family.name,
                                        page, expectedPage, linkedPage))
                             except KeyError:
                                 if not expectedPage.site.is_data_repository():
-                                    pywikibot.output(
-                                        u"WARNING: %s: %s does not link to %s"
+                                    pywikibot.warning(
+                                        '%s: %s does not link to %s'
                                         % (page.site.family.name,
                                            page, expectedPage))
                     # Check for superfluous links
@@ -2046,8 +2046,8 @@
                             # Check whether there is an alternative page on 
that language.
                             # In this case, it was already reported above.
                             if linkedPage.site not in expectedSites:
-                                pywikibot.output(
-                                    u"WARNING: %s: %s links to incorrect %s"
+                                pywikibot.warning(
+                                    '%s: %s links to incorrect %s'
                                     % (page.site.family.name,
                                        page, linkedPage))
         except (socket.error, IOError):
diff --git a/scripts/maintenance/wikimedia_sites.py 
b/scripts/maintenance/wikimedia_sites.py
index b0d235d..f8f4a3f 100755
--- a/scripts/maintenance/wikimedia_sites.py
+++ b/scripts/maintenance/wikimedia_sites.py
@@ -62,8 +62,8 @@
         # put the missing languages to the right place
         missing = original != new and set(original) - set(new)
         if missing:
-            pywikibot.output(u"WARNING: ['%s'] not listed at wikistats."
-                             % "', '".join(missing))
+            pywikibot.warning("['%s'] not listed at wikistats."
+                              % "', '".join(missing))
             index = {}
             for code in missing:
                 index[original.index(code)] = code

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0102c09d3550adace905cca0a50922e23adda8f5
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Lokal Profil <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to