jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/508107 )
Change subject: [cleanup] return value of addCommonscat is never used ......................................................................
[cleanup] return value of addCommonscat is never used
- remove returning True in addCommonscat - unpack add_text to variables
Change-Id: I87015ef637794635e4a519660cd09498825f2d1d --- M scripts/commonscat.py 1 file changed, 6 insertions(+), 8 deletions(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 473db6a..8bd8edd 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -285,7 +285,7 @@ pywikibot.output('Commonscat link at {} to Category:{} is ok' .format(page.title(), currentCommonscatTarget)) - return True + return
if checkedCommonscatTarget: # We have a new Commonscat link, replace the old one @@ -293,7 +293,7 @@ currentCommonscatTarget, primaryCommonscat, checkedCommonscatTarget, LinkText, Note) - return True + return
# Commonscat link is wrong commonscatLink = self.findCommonscatLink(page) @@ -314,12 +314,10 @@ else: textToAdd = '{{%s|%s}}' % (primaryCommonscat, commonscatLink) - rv = add_text(page, textToAdd, - self.getOption('summary'), - always=self.getOption('always')) - self.options['always'] = rv[2] - return True - return True + _, _, always = add_text(page, textToAdd, + self.getOption('summary'), + always=self.getOption('always')) + self.options['always'] = always
def changeCommonscat( self, page=None, oldtemplate='', oldcat='',
pywikibot-commits@lists.wikimedia.org