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:
Eric Harney 2014-07-24 17:38:17 -04:00
parent fd8aa39458
commit 20060b102a

@ -315,8 +315,7 @@ class HTTPClient(CinderClientMixin):
else:
raise
except requests.exceptions.ConnectionError as e:
# Catch a connection refused from requests.request
self._logger.debug("Connection refused: %s" % e)
self._logger.debug("Connection error: %s" % e)
if attempts > self.retries:
msg = 'Unable to establish connection: %s' % e
raise exceptions.ConnectionError(msg)