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>
diff --git a/gerrit_util.py b/gerrit_util.py
index a8b04ad..eb30807 100644
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -380,7 +380,7 @@
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]