jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/467919 )

Change subject: [simplify] use verbose_output method
......................................................................

[simplify] use verbose_output method

follow-up of cad9b0b00

Change-Id: I5c68b239c50cfa0cd12cfa098848292afb9193b0
---
M scripts/patrol.py
1 file changed, 5 insertions(+), 11 deletions(-)

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



diff --git a/scripts/patrol.py b/scripts/patrol.py
index 77f1205..8704d6d 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -344,8 +344,7 @@
                 pywikibot.output('Patrolled {0} (rcid {1}) by user {2}'
                                  .format(title, rcid, username))
             else:
-                if pywikibot.config.verbose_output:
-                    pywikibot.output('Skipped')
+                verbose_output('Skipped')

             if rcid > self.highest_rcid:
                 self.highest_rcid = rcid
@@ -387,24 +386,19 @@
             raise Exception('This is a wikisource rule')

         if not self.linkedpages:
-            if pywikibot.config.verbose_output:
-                pywikibot.output('loading page links on ' + self.page_title)
+            verbose_output('loading page links on ' + self.page_title)
             p = pywikibot.Page(self.site, self.page_title)
             linkedpages = []
             for linkedpage in p.linkedPages():
                 linkedpages.append(linkedpage.title())

             self.linkedpages = linkedpages
-            if pywikibot.config.verbose_output:
-                pywikibot.output('Loaded {0} page links'
-                                 .format(len(linkedpages)))
+            verbose_output('Loaded {0} page links'.format(len(linkedpages)))

         for p in self.linkedpages:
-            if pywikibot.config.verbose_output:
-                pywikibot.output("Checking against '{0}'".format(p))
+            verbose_output("Checking against '{0}'".format(p))
             if page_title.startswith(p):
-                if pywikibot.config.verbose_output:
-                    pywikibot.output('Matched.')
+                verbose_output('Matched.')
                 return p



--
To view, visit https://gerrit.wikimedia.org/r/467919
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5c68b239c50cfa0cd12cfa098848292afb9193b0
Gerrit-Change-Number: 467919
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: Framawiki <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to