jenkins-bot merged this change.
[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.