jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/281603 )
Change subject: [IMPR] Rewrite setParameters() ...................................................................... [IMPR] Rewrite setParameters() - assign image from generator to setParameters directly - setup self.imageName (might be replaced by self.image.title() later) - remove "future" comment Change-Id: I869c8f34c612e90e7bf1108429117b851a47aaf6 --- M scripts/checkimages.py 1 file changed, 7 insertions(+), 10 deletions(-) Approvals: jenkins-bot: Verified Sn1per: Looks good to me, approved diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 213ab96..7196cb1 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -82,7 +82,7 @@ # (C) Kyle/Orgullomoore, 2006-2007 (newimage.py) # (C) Siebrand Mazeland, 2007-2010 # (C) Filnik, 2007-2011 -# (C) Pywikibot team, 2007-2016 +# (C) Pywikibot team, 2007-2017 # # Distributed under the terms of the MIT license. # @@ -596,14 +596,11 @@ """Return username.""" return self.site.username() - def setParameters(self, imageName): - """ - Set parameters. - - Now only image but maybe it can be used for others in "future". - """ - self.imageName = imageName - self.image = pywikibot.FilePage(self.site, self.imageName) + def setParameters(self, image): + """Set parameters.""" + # ensure we have a FilePage + self.image = pywikibot.FilePage(image) + self.imageName = image.title(withNamespace=False) self.timestamp = None self.uploader = None @@ -1752,7 +1749,7 @@ generator = Bot.wait(generator, waitTime) for image in generator: # Setting the image for the main class - Bot.setParameters(image.title(withNamespace=False)) + Bot.setParameters(image) if skip: skip = Bot.skipImages(skip_number, limit) if skip: -- To view, visit https://gerrit.wikimedia.org/r/281603 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I869c8f34c612e90e7bf1108429117b851a47aaf6 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Magul <tomasz.magul...@gmail.com> Gerrit-Reviewer: Sn1per <geof...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits