jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462683 )
Change subject: [cleanup] cleanup scripts/flickrripper.py ......................................................................
[cleanup] cleanup scripts/flickrripper.py
- use str.format(...) instead of modulo for type specifier arguments.
Change-Id: Iafa8a11fd24cea16b2e3ba387eb0ff11410ce392 --- M scripts/flickrripper.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py index 6437bce..795a45c 100755 --- a/scripts/flickrripper.py +++ b/scripts/flickrripper.py @@ -199,11 +199,11 @@ title = '' # Should probably have the id of the photo as last resort.
- if pywikibot.Page(site, 'File:%s - %s - %s.jpg' - % (title, project, username)).exists(): + if pywikibot.Page(site, 'File:{} - {} - {}.jpg' + .format(title, project, username)).exists(): i = 1 while True: - name = '%s - %s - %s (%d).jpg' % (title, project, username, i) + name = '{} - {} - {} ({}).jpg'.format(title, project, username, i) if pywikibot.Page(site, 'File:' + name).exists(): i += 1 else: @@ -246,7 +246,7 @@ The description is based on the info from flickrinfo and improved.
""" - description = '== {{int:filedesc}} ==\n%s' % flinfoDescription + description = '== {{int:filedesc}} ==\n{}'.format(flinfoDescription) if removeCategories: description = textlib.removeCategoryLinks(description, pywikibot.Site(
pywikibot-commits@lists.wikimedia.org