From 52820d09195729416e9b5b4894107bf332afc62e Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Thu, 8 Nov 2012 23:11:14 +0000 Subject: [PATCH] THRIFT-1749 Python TSSLSocket error handling obscures actual error Patch: Tyler Hobbs git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1407311 13f79535-47bb-0310-9956-ffa450edef68 --- lib/py/src/transport/TSSLSocket.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/py/src/transport/TSSLSocket.py b/lib/py/src/transport/TSSLSocket.py index e0ff4f94..7bf28aa7 100644 --- a/lib/py/src/transport/TSSLSocket.py +++ b/lib/py/src/transport/TSSLSocket.py @@ -94,9 +94,10 @@ class TSSLSocket(TSocket.TSocket): break except socket.error as e: if self._unix_socket: - message = 'Could not connect to secure socket %s' % self._unix_socket + message = 'Could not connect to secure socket %s: %s' \ + % (self._unix_socket, e) else: - message = 'Could not connect to %s:%d' % (self.host, self.port) + message = 'Could not connect to %s:%d: %s' % (self.host, self.port, e) raise TTransportException(type=TTransportException.NOT_OPEN, message=message) if self.validate: -- 2.17.1