depot_tools: Make gsutil compatible with python3.
Bug: 1026371
Change-Id: Iddef64ac2d3a9f97fdb0540a048dfb9dc5679b5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1925407
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/gsutil.py b/gsutil.py
index 8d5de5d..46682c5 100755
--- a/gsutil.py
+++ b/gsutil.py
@@ -59,7 +59,7 @@
metadata_url = '%s%s' % (API_URL, filename)
metadata = json.load(urllib.urlopen(metadata_url))
- remote_md5 = base64.b64decode(metadata['md5Hash'])
+ remote_md5 = base64.b64decode(metadata['md5Hash']).decode('utf-8')
if local_md5 == remote_md5:
return target_filename