From 1fe0e4ee604ea9b6951eb3cc8e573b0e3b81bfde Mon Sep 17 00:00:00 2001 From: Nilakhya Date: Thu, 30 Jan 2014 19:36:19 +0530 Subject: [PATCH] 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 --- troveclient/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troveclient/client.py b/troveclient/client.py index 95dbfbf5..74192e95 100644 --- a/troveclient/client.py +++ b/troveclient/client.py @@ -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))