mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #29058 from TronPaul/requests-connection-error
ConnectTimeout does not exist in all requests>=1.0.0
This commit is contained in:
commit
c7e3670324
@ -85,7 +85,7 @@ def creds(provider):
|
||||
)
|
||||
result.raise_for_status()
|
||||
role = result.text
|
||||
except (requests.exceptions.HTTPError, requests.exceptions.ConnectTimeout):
|
||||
except (requests.exceptions.HTTPError, requests.exceptions.ConnectionError):
|
||||
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, requests.exceptions.ConnectTimeout):
|
||||
except (requests.exceptions.HTTPError, requests.exceptions.ConnectionError):
|
||||
return provider['id'], provider['key'], ''
|
||||
|
||||
data = result.json()
|
||||
|
Loading…
Reference in New Issue
Block a user