Commit 5c79613f by Dirk Pranke Committed by Commit Bot

Make sure commit position is a string.

In Python 3, you have to be careful to distinguish between bytes and strings when reading from subprocesses; the code to read the commit position was failing to do that in one place. Bug: chromium:1112471 Change-Id: Ifbfba6872f762d7e5d7e356772e93b4a7ee1dfeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508746 Commit-Queue: Dirk Pranke <dpranke@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent fcd35965
......@@ -17,7 +17,8 @@ Usage: commit_id.py check - check if git is present
def grab_output(command, cwd):
return sp.Popen(command, stdout=sp.PIPE, shell=True, cwd=cwd).communicate()[0].strip()
return sp.Popen(
command, stdout=sp.PIPE, shell=True, cwd=cwd).communicate()[0].strip().decode('utf-8')
def get_commit_position(cwd):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment