From 74fc993e25e7624ef575528ea4295993a80d3cfe Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Fri, 3 Aug 2018 22:24:46 +0200 Subject: [PATCH] vcs: add nicer traceback information for curl errors. --- rhodecode/lib/vcs/client_http.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rhodecode/lib/vcs/client_http.py b/rhodecode/lib/vcs/client_http.py index 0d234ded..e5600b40 100644 --- a/rhodecode/lib/vcs/client_http.py +++ b/rhodecode/lib/vcs/client_http.py @@ -28,6 +28,7 @@ import threading import urllib2 import urlparse import uuid +import traceback import pycurl import msgpack @@ -197,7 +198,8 @@ def _remote_call(url, payload, exceptions_map, session): try: response = session.post(url, data=msgpack.packb(payload)) except pycurl.error as e: - raise exceptions.HttpVCSCommunicationError(e) + msg = '{}. pycurl traceback: {}'.format(e, traceback.format_exc()) + raise exceptions.HttpVCSCommunicationError(msg) except Exception as e: message = getattr(e, 'message', '') if 'Failed to connect' in message: