Change "Connection refused" to "Connection error"
The python-requests documentation indicates that the ConnectionError exception can be raised for reasons other than "connection refused". Let's just say "error" rather than implying the wrong type of failure. Change-Id: I2205e27c7c68164db430cdfdc71b57b3002b24be
This commit is contained in:
@@ -315,8 +315,7 @@ class HTTPClient(CinderClientMixin):
|
|||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
except requests.exceptions.ConnectionError as e:
|
except requests.exceptions.ConnectionError as e:
|
||||||
# Catch a connection refused from requests.request
|
self._logger.debug("Connection error: %s" % e)
|
||||||
self._logger.debug("Connection refused: %s" % e)
|
|
||||||
if attempts > self.retries:
|
if attempts > self.retries:
|
||||||
msg = 'Unable to establish connection: %s' % e
|
msg = 'Unable to establish connection: %s' % e
|
||||||
raise exceptions.ConnectionError(msg)
|
raise exceptions.ConnectionError(msg)
|
||||||
|
Reference in New Issue
Block a user