ninjalog uploader: migrate to python3

This removes dependency to httplib2 by using urllib.
https://docs.python.org/3/library/http.client.html#httpresponse-objects

Use six for both py2/py3 unittest.

Bug: b/177465438
Change-Id: I48383559842615f97abea45b55ca0acf4d7c8bd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2629087
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
This commit is contained in:
Takuto Ikuta
2021-01-19 02:51:50 +00:00
committed by LUCI CQ
parent 13466d016b
commit 84e43fa2c4
5 changed files with 106 additions and 109 deletions

View File

@@ -24,12 +24,12 @@ if eval "$command"; then
fi
# Collect ninjalog from googler.
python "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
python3 "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
exit
fi
# Collect ninjalog from googler.
python "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
python3 "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
# Return an error code of 1 so that if a developer types:
# "autoninja chrome && chrome" then chrome won't run if the build fails.