Improved error message on connection failure

Added message from thrown error to message generated when httpclient connection fails

Closes-Bug: 1248257

Change-Id: Id47092f5775b97e8423e18c294f4e04872aa0b08
This commit is contained in:
David C Kennedy
2013-11-06 11:31:30 +00:00
parent dca1d4259d
commit 9dd978817b

View File

@@ -110,8 +110,8 @@ def request(url, method='GET', headers=None, original_ip=None, debug=False,
url, url,
headers=headers, headers=headers,
**kwargs) **kwargs)
except requests.ConnectionError: except requests.ConnectionError as e:
msg = 'Unable to establish connection to %s' % url msg = 'Unable to establish connection to %s: %s' % (url, e)
raise exceptions.ClientException(msg) raise exceptions.ClientException(msg)
if debug: if debug: