Merge pull request #29058 from TronPaul/requests-connection-error

ConnectTimeout does not exist in all requests>=1.0.0
This commit is contained in:
Mike Place 2015-11-19 13:16:53 -07:00
commit c7e3670324

View File

@ -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()