mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Catch timeouts too
This commit is contained in:
parent
fa46dbb2a3
commit
8d9224bd09
@ -85,7 +85,7 @@ def creds(provider):
|
||||
)
|
||||
result.raise_for_status()
|
||||
role = result.text
|
||||
except requests.exceptions.HTTPError:
|
||||
except (requests.exceptions.HTTPError, requests.exceptions.ConnectTimeout):
|
||||
return provider['id'], provider['key'], ''
|
||||
|
||||
try:
|
||||
@ -94,7 +94,7 @@ def creds(provider):
|
||||
proxies={'http': ''}, timeout=AWS_METADATA_TIMEOUT,
|
||||
)
|
||||
result.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
except (requests.exceptions.HTTPError, requests.exceptions.ConnectTimeout):
|
||||
return provider['id'], provider['key'], ''
|
||||
|
||||
data = result.json()
|
||||
|
Loading…
Reference in New Issue
Block a user