Repository: mesos Updated Branches: refs/heads/master 2e874dc98 -> 415451ee8
Fixed python3/post-reviews.py type error. The main challenge when switching from Python 2 to Python 3 is to handle the strings, as many of them are now byte strings. I have checked the other uses of `sys.stdout.buffer.write` while working on this commit to check that it was the last issue of that type in python3/post-reviews.py. Review: https://reviews.apache.org/r/67321/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5984e68e Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5984e68e Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5984e68e Branch: refs/heads/master Commit: 5984e68e19018890ac6a3d27133aa84b5f859b00 Parents: 2e874dc Author: Armand Grillet <[email protected]> Authored: Fri May 25 14:00:48 2018 +0200 Committer: Alexander Rukletsov <[email protected]> Committed: Fri May 25 14:02:26 2018 +0200 ---------------------------------------------------------------------- support/python3/post-reviews.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/5984e68e/support/python3/post-reviews.py ---------------------------------------------------------------------- diff --git a/support/python3/post-reviews.py b/support/python3/post-reviews.py index 9621898..2048278 100755 --- a/support/python3/post-reviews.py +++ b/support/python3/post-reviews.py @@ -362,7 +362,8 @@ def main(): output = execute(command).strip() - sys.stdout.buffer.write(output) + # Output is a string, we convert it to a byte string before writing it. + sys.stdout.buffer.write(output.encode()) # If we already have a request_id, continue on to the next commit in the # chain. We update 'previous' from the shas[] array because we have
