depot_tools: Make some changes to make metrics collection compatible with Python 3.

Bug: 984182
Change-Id: I55e9e83d01d5a86464cc234c083e4212f0ba4a1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1713217
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
This commit is contained in:
Edward Lemur
2019-07-22 20:12:01 +00:00
committed by Commit Bot
parent 004da782dd
commit 73065b2067
4 changed files with 11 additions and 10 deletions

View File

@@ -168,7 +168,7 @@ def get_git_version():
['git', '--version'],
stdout=subprocess2.PIPE, stderr=subprocess2.PIPE)
stdout, _ = p.communicate()
match = GIT_VERSION_RE.match(stdout)
match = GIT_VERSION_RE.match(stdout.decode('utf-8'))
if not match:
return None
return '%s.%s.%s' % match.groups()