Xqt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281660
Change subject: [IMPR] Simplify printWithTimeZone
......................................................................
[IMPR] Simplify printWithTimeZone
Change-Id: Icef93859848c9db1a8217077c6054289a2b808bb
---
M scripts/checkimages.py
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/60/281660/1
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 7644cc5..02e9a0b 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -528,10 +528,8 @@
def printWithTimeZone(message):
"""Print the messages followed by the TimeZone encoded correctly."""
- if message[-1] != ' ':
- message = u'%s ' % message
time_zone = time.strftime(u"%d %b %Y %H:%M:%S (UTC)", time.gmtime())
- pywikibot.output(u"%s%s" % (message, time_zone))
+ pywikibot.output('{0} {1}'.format(message.rstrip(), time_zone))
class checkImagesBot(object):
--
To view, visit https://gerrit.wikimedia.org/r/281660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icef93859848c9db1a8217077c6054289a2b808bb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits