Add global 300s global timeout for Gerrit API calls

This will not impact the calls which have explicit timeout.
For the rest, either PUT or POST or DELETE methods, 5 min should
suffice.

Fixed: 1441863
TEST=NA

Change-Id: I235bc60344b6981eb3d96930ca8b6463129a2be2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4495994
Commit-Queue: Xinan Lin <linxinan@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/94/4495994/5
Xinan Lin 3 years ago committed by LUCI CQ
parent 13878e1f72
commit 1344a3c998

@ -380,7 +380,7 @@ def CreateHttpConn(host,
reqtype='GET',
headers=None,
body=None,
timeout=None):
timeout=300):
"""Opens an HTTPS connection to a Gerrit service, and sends a request."""
headers = headers or {}
bare_host = host.partition(':')[0]

Loading…
Cancel
Save