From 9dd978817bb26280121161fbdc9a47b612d8ed61 Mon Sep 17 00:00:00 2001 From: David C Kennedy Date: Wed, 6 Nov 2013 11:31:30 +0000 Subject: [PATCH] Improved error message on connection failure Added message from thrown error to message generated when httpclient connection fails Closes-Bug: 1248257 Change-Id: Id47092f5775b97e8423e18c294f4e04872aa0b08 --- keystoneclient/httpclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index 7146d8c07..1fc718b61 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -110,8 +110,8 @@ def request(url, method='GET', headers=None, original_ip=None, debug=False, url, headers=headers, **kwargs) - except requests.ConnectionError: - msg = 'Unable to establish connection to %s' % url + except requests.ConnectionError as e: + msg = 'Unable to establish connection to %s: %s' % (url, e) raise exceptions.ClientException(msg) if debug: