Skip to content

Commit a3dea46

Browse files
authored
Add a default timeout of 90 (#1912)
1 parent 56e1b34 commit a3dea46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iap/make_iap_request.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ def make_iap_request(url, client_id, method='GET', **kwargs):
4040
('GET', 'OPTIONS', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE')
4141
**kwargs: Any of the parameters defined for the request function:
4242
https://github.com/requests/requests/blob/master/requests/api.py
43+
If no timeout is provided, it is set to 90 by default.
4344
4445
Returns:
4546
The page body, or raises an exception if the page couldn't be retrieved.
4647
"""
48+
# Set the default timeout, if missing
49+
if 'timeout' not in kwargs:
50+
kwargs['timeout'] = 90
51+
4752
# Figure out what environment we're running in and get some preliminary
4853
# information about the service account.
4954
bootstrap_credentials, _ = google.auth.default(

0 commit comments

Comments
 (0)