jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[cleanup] cleanup scripts/imageharvest.py

- use str.format(...) instead of modulo for type specifier
arguments

Change-Id: I1671a475e4088176263506b8ee0cadce3bbbe722
---
M scripts/imageharvest.py
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/imageharvest.py b/scripts/imageharvest.py
index 98b2226..196b60d 100644
--- a/scripts/imageharvest.py
+++ b/scripts/imageharvest.py
@@ -113,7 +113,7 @@
ilinks = get_imagelinks(url)

for image in ilinks:
- if pywikibot.input_yn('Include image %s?' % image, default=False,
+ if pywikibot.input_yn('Include image {}?'.format(image), default=False,
automatic_quit=False):
desc = pywikibot.input('Give the description of this image:')
categories = []
@@ -125,8 +125,8 @@
if ':' in cat:
categories.append('[[{}]]'.format(cat))
else:
- categories.append('[[%s:%s]]'
- % (mysite.namespace(14), cat))
+ categories.append('[[{}:{}]]'
+ .format(mysite.namespace(14), cat))
desc += '\n\n' + basicdesc + '\n\n' + '\n'.join(categories)
UploadRobot(image, description=desc).run()
elif answer == 's':

To view, visit change 462553. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1671a475e4088176263506b8ee0cadce3bbbe722
Gerrit-Change-Number: 462553
Gerrit-PatchSet: 1
Gerrit-Owner: D3r1ck01 <alangiderick@gmail.com>
Gerrit-Reviewer: D3r1ck01 <alangiderick@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)