Skip to content
Browse files

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
  • Loading branch information...
1 parent 0069a44 commit 52820d09195729416e9b5b4894107bf332afc62e @bufferoverflow bufferoverflow committed Nov 8, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/py/src/transport/TSSLSocket.py
View
5 lib/py/src/transport/TSSLSocket.py
@@ -94,9 +94,10 @@ def open(self):
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:

0 comments on commit 52820d0

Please sign in to comment.
Something went wrong with that request. Please try again.