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:
Nilakhya
2014-01-30 19:36:19 +05:30
parent 11c45de9e0
commit 1fe0e4ee60

View File

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