more verbose errors

This commit is contained in:
Maximilian Hils 2014-09-08 18:38:05 +02:00
parent 07990fdcc2
commit f90ea89e69

View File

@ -308,7 +308,7 @@ class TCPClient(_Connection):
try:
self.connection.do_handshake()
except SSL.Error, v:
raise NetLibError("SSL handshake error: %s"%str(v))
raise NetLibError("SSL handshake error: %s"%repr(v))
self.cert = certutils.SSLCert(self.connection.get_peer_certificate())
self.rfile.set_descriptor(self.connection)
self.wfile.set_descriptor(self.connection)
@ -417,7 +417,7 @@ class BaseHandler(_Connection):
try:
self.connection.do_handshake()
except SSL.Error, v:
raise NetLibError("SSL handshake error: %s"%str(v))
raise NetLibError("SSL handshake error: %s"%repr(v))
self.rfile.set_descriptor(self.connection)
self.wfile.set_descriptor(self.connection)