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>
diff --git a/metrics_utils.py b/metrics_utils.py
index 33f4e12..281b786 100644
--- a/metrics_utils.py
+++ b/metrics_utils.py
@@ -168,7 +168,7 @@
       ['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()