Updating update.py for python3
update.py fails with TypeError: can't concat str to bytes when run under
Python 3. This converts the byte data returned by
subprocess.check_output to str to allow concatenation. update.py will
still run under Python 2.
Change-Id: I74f64b81c79e681c1d41c610f8d180c37bfa4c1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3459404
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#970368}
diff --git a/third_party/crashpad/update.py b/third_party/crashpad/update.py
index 6758d6b..75756925 100755
--- a/third_party/crashpad/update.py
+++ b/third_party/crashpad/update.py
@@ -85,6 +85,7 @@
original_head = (
subprocess.check_output(['git', 'rev-parse', 'HEAD'],
shell=IS_WINDOWS).rstrip())
+ original_head = original_head.decode('utf-8')
# Read the README, because that’s what it’s for. Extract some things from
# it, and save it to be able to update it later.