Merge "Improved error message on connection failure"

This commit is contained in:
Jenkins
2013-11-24 21:05:35 +00:00
committed by Gerrit Code Review

View File

@@ -113,8 +113,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: