jenkins-bot has submitted this change and it was merged.
Change subject: (bugfix) imagetransfer.py: remove broken debug ......................................................................
(bugfix) imagetransfer.py: remove broken debug
In the conversion from lib_images.py to imagetransfer.py, the following line was dropped: imageTitle = sourceImagePage.title().encode('utf-8')
https://www.mediawiki.org/wiki/Special:Code/pywikipedia/2066 sha 9f6e1eb090ee6ee355cf65984cd3adcf851c8470
As a result, the logging of the imageTitle has referenced an undefined variable since 2005. This debug log entry is disabled in the code. There are also no bugs reported, so it is unlikely to be needed.
Change-Id: Ie044fba2e32e1f34e9d96eb4baa45bd52fc04e8b --- M imagetransfer.py 1 file changed, 2 insertions(+), 5 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/imagetransfer.py b/imagetransfer.py index f5979d1..3f28d83 100644 --- a/imagetransfer.py +++ b/imagetransfer.py @@ -160,7 +160,7 @@ self.targetSite = targetSite self.keep_name = keep_name
- def transferImage(self, sourceImagePage, debug=False): + def transferImage(self, sourceImagePage): """Gets a wikilink to an image, downloads it and its description, and uploads it to another wikipedia. Returns the filename which was used to upload the image @@ -168,9 +168,6 @@
""" sourceSite = sourceImagePage.site() - if debug: - print "-" * 50 - print "Found image: %s" % imageTitle url = sourceImagePage.fileUrl().encode('utf-8') pywikibot.output(u"URL should be: %s" % url) # localize the text that should be printed on the image description page @@ -291,7 +288,7 @@ pywikibot.output( u'The image is already on Wikimedia Commons.') else: - self.transferImage(imagelist[todo], debug=False) + self.transferImage(imagelist[todo]) # remove the selected image from the list imagelist = imagelist[:todo] + imagelist[todo + 1:] else:
pywikibot-commits@lists.wikimedia.org