jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/274054 )
Change subject: Remove imagetransfer.py from T001/T003 testing ......................................................................
Remove imagetransfer.py from T001/T003 testing
(omit print function)
- replace print statements with pywikibot.output() in imagetransfer.py
Change-Id: I92cfddafe56ae10c2f83c087bda2b6f1333d6901 --- M scripts/imagetransfer.py M tox.ini 2 files changed, 6 insertions(+), 6 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py index 7c2a0fe..bcac3db 100755 --- a/scripts/imagetransfer.py +++ b/scripts/imagetransfer.py @@ -163,10 +163,11 @@ description += u'\r\n\r\n{0}'.format(sourceImagePage) except pywikibot.NoPage: description = '' - print("Image does not exist or description page is empty.") + pywikibot.output( + 'Image does not exist or description page is empty.') except pywikibot.IsRedirectPage: description = '' - print("Image description page is redirect.") + pywikibot.output('Image description page is redirect.') else: bot = upload.UploadRobot(url=url, description=description, targetSite=self.targetSite, @@ -201,7 +202,7 @@ """Print image list.""" for i in range(len(imagelist)): image = imagelist[i] - print("-" * 60) + pywikibot.output('-' * 60) pywikibot.output(u"%s. Found image: %s" % (i, image.title(asLink=True))) try: @@ -219,7 +220,7 @@ targetImage.get() pywikibot.output(u"Image with this name is already on %s." % self.targetSite) - print("-" * 60) + pywikibot.output('-' * 60) pywikibot.output(targetImage.get()) sys.exit() except pywikibot.NoPage: @@ -231,7 +232,7 @@
except pywikibot.NoPage: break - print("=" * 60) + pywikibot.output('=' * 60)
def run(self): """Run the bot.""" diff --git a/tox.ini b/tox.ini index c436cf8..ec36625 100644 --- a/tox.ini +++ b/tox.ini @@ -154,7 +154,6 @@ tests/__init__.py,tests/aspects.py,tests/script_tests.py,tests/site_detect_tests.py : +T001, T003 tests/pwb/ : +T001, T003 tests/,/from pywikibot.tools import/ : +N813 - scripts/imagetransfer.py : +T001, T003 scripts/checkimages.py,scripts/imagecopy.py,scripts/imagecopy_self.py : +N801 scripts/maintenance/make_i18n_dict.py : +T001, T003 scripts/archive/featured.py : +D102, D103
pywikibot-commits@lists.wikimedia.org