Merge "Raise an explicit BackendError on TLS failures"

This commit is contained in:
Jenkins 2016-05-17 23:43:49 +00:00 committed by Gerrit Code Review
commit 902e47efa5
1 changed files with 6 additions and 0 deletions

View File

@ -215,6 +215,12 @@ class ConnectionManager(object):
def _bind(self, conn, bind, passwd):
# let's bind
if self.use_tls:
try:
conn.start_tls_s()
except Exception:
raise BackendError('Could not activate TLS on established '
'connection with %s' % self.uri,
backend=conn)
conn.start_tls_s()
if bind is not None: