Commit 9217ff8b authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

depot_tools: Make metrics Python 3 compatible.

Bug: 984182
Change-Id: I2b7e4be6131558019d461e09d062b52085f330ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1702855Reviewed-by: 's avatarAndy Perelson <ajp@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 966ad191
......@@ -226,7 +226,7 @@ def extract_http_metrics(request_uri, method, status, response_time):
if parsed_url.netloc in KNOWN_HTTP_HOSTS:
http_metrics['host'] = parsed_url.netloc
for name, path_re in KNOWN_HTTP_PATHS.iteritems():
for name, path_re in KNOWN_HTTP_PATHS.items():
if path_re.match(parsed_url.path):
http_metrics['path'] = name
break
......@@ -287,7 +287,7 @@ def print_notice(countdown):
def print_version_change(config_version):
"""Print a notice to let the user know we are collecting more metrics."""
lines = list(get_notice_version_change_header())
for version in xrange(config_version + 1, CURRENT_VERSION + 1):
for version in range(config_version + 1, CURRENT_VERSION + 1):
lines.append('')
lines += list(get_change_notice(version))
print_boxed_text(sys.stderr.write, 49, lines)
......@@ -13,7 +13,6 @@ sys.path.insert(0, ROOT_DIR)
import metrics
import metrics_utils
import cStringIO
from third_party import mock
......
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