XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/243131
Change subject: [IMPROV] Support Python 3 in commit message validator ...................................................................... [IMPROV] Support Python 3 in commit message validator Even though the job will be probably run using Python 2 for a long time, the issues using Python 3 are minor and easy to fix. This does not fix the tests as the metaclass usage has been changed to much to easily support both versions. Change-Id: I52408ab450c929cdf10cddb1405ee0e4614d8473 --- M tools/commit-message-validator.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/31/243131/1 diff --git a/tools/commit-message-validator.py b/tools/commit-message-validator.py index 4852c8e..609518e 100755 --- a/tools/commit-message-validator.py +++ b/tools/commit-message-validator.py @@ -9,6 +9,7 @@ https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines """ +import locale import re import subprocess @@ -141,7 +142,7 @@ if errors: for e in errors: - print e + print(e) return 1 return 0 @@ -149,6 +150,7 @@ def main(): """Validate the current HEAD commit message.""" commit = subprocess.check_output('git log --pretty=raw -1', shell=True) + commit = commit.decode(locale.getpreferredencoding()) lines = commit.splitlines() # Discard until the first blank line -- To view, visit https://gerrit.wikimedia.org/r/243131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52408ab450c929cdf10cddb1405ee0e4614d8473 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: XZise <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
