Fixes troveclient raising undefined exception ConnectionError
Reason: ConnectionError exception is raised which is not defined in
python-troveclient/troveclient/openstack/common/apiclient/exceptions.py
Change: ConnectionError should be renamed to ConnectionRefused.
Closes-Bug: #1240950
Change-Id: I73219d29efd71185cdf6ff56a7fe41165541681f
This commit is contained in:
@@ -197,7 +197,7 @@ class HTTPClient(object):
|
||||
# Catch a connection refused from requests.request
|
||||
self._logger.debug("Connection refused: %s" % e)
|
||||
msg = 'Unable to establish connection: %s' % e
|
||||
raise exceptions.ConnectionError(msg)
|
||||
raise exceptions.ConnectionRefused(msg)
|
||||
self._logger.debug(
|
||||
"Failed attempt(%s of %s), retrying in %s seconds" %
|
||||
(attempts, self.retries, backoff))
|
||||
|
||||
Reference in New Issue
Block a user