jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462561 )
Change subject: [cleanup] cleanup scripts/image.py ......................................................................
[cleanup] cleanup scripts/image.py
- use str.format(...) instead of modulo for type specifier arguments - use single quotes for string literals
Change-Id: Icd332d9c7a8f8fb2c235d6232cf229d4f2e14ed4 --- M scripts/image.py 1 file changed, 5 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/image.py b/scripts/image.py index 374b821..ca3a664 100755 --- a/scripts/image.py +++ b/scripts/image.py @@ -109,9 +109,10 @@ if self.new_image: if not self.getOption('loose'): replacements.append((image_regex, - u'[[%s:%s\g<parameters>]]' - % (self.site.namespaces.FILE.custom_name, - self.new_image))) + '[[{}:{}\g<parameters>]]' + .format( + self.site.namespaces.FILE.custom_name, + self.new_image))) else: replacements.append((image_regex, self.new_image)) else: @@ -166,5 +167,5 @@ return False
-if __name__ == "__main__": +if __name__ == '__main__': main()