jenkins-bot submitted this change.
[bugfix] Do not use UploadRobot.run() with imagetransfer
imagetransfer needs the final target filename for tagging nocommons template.
Therefore don't use bulk upload with UploadRobot.run() but use the
UploadRobot.upload_file method to upload a single file.
Bug: T267579
Change-Id: I9b792bd850de8686ffd3a6ef4a58822565eca1b7
---
M scripts/imagetransfer.py
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index 0d11a80..0171c19 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -197,9 +197,13 @@
keep_filename=self.keep_name,
verify_description=not self.keep_name,
ignore_warning=self.ignore_warning)
+
# try to upload
- targetFilename = bot.run()
- if targetFilename and self.targetSite.family.name == 'commons' \
+ if bot.self.skip_run():
+ return
+ target_filename = bot.upload_file(url)
+
+ if target_filename and self.targetSite.family.name == 'commons' \
and self.targetSite.code == 'commons':
# upload to Commons was successful
reason = i18n.twtranslate(sourceSite,
@@ -217,7 +221,7 @@
+ sourceImagePage.title())
sourceImagePage.put(sourceImagePage.get() + '\n\n'
+ nowCommonsTemplate[sourceSite.lang]
- % targetFilename,
+ % target_filename,
summary=reason)
def show_image_list(self, imagelist):
To view, visit change 640229. To unsubscribe, or for help writing mail filters, visit settings.