Skip to content

Commit

Permalink
Add a default timeout of 90 (#1912)
Browse files Browse the repository at this point in the history
  • Loading branch information
engelke committed Dec 7, 2018
1 parent 56e1b34 commit a3dea46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iap/make_iap_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ def make_iap_request(url, client_id, method='GET', **kwargs):
('GET', 'OPTIONS', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE')
**kwargs: Any of the parameters defined for the request function:
https://github.com/requests/requests/blob/master/requests/api.py
If no timeout is provided, it is set to 90 by default.
Returns:
The page body, or raises an exception if the page couldn't be retrieved.
"""
# Set the default timeout, if missing
if 'timeout' not in kwargs:
kwargs['timeout'] = 90

# Figure out what environment we're running in and get some preliminary
# information about the service account.
bootstrap_credentials, _ = google.auth.default(
Expand Down

0 comments on commit a3dea46

Please sign in to comment.