From b039dc80753cf82875e0bbf54df815045502cfd0 Mon Sep 17 00:00:00 2001 From: twneale Date: Tue, 3 May 2016 11:48:10 -0400 Subject: [PATCH] Allow StartTLS response to be ascii or bytes (py3k) --- vertica_python/vertica/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vertica_python/vertica/connection.py b/vertica_python/vertica/connection.py index d9e45c6c..eb70c4de 100644 --- a/vertica_python/vertica/connection.py +++ b/vertica_python/vertica/connection.py @@ -113,7 +113,7 @@ def _socket(self): from ssl import CertificateError, SSLError raw_socket.sendall(messages.SslRequest().to_bytes()) response = raw_socket.recv(1) - if response == 'S': + if response in ('S', b'S'): try: if isinstance(ssl_options, ssl.SSLContext): raw_socket = ssl_options.wrap_socket(raw_socket, server_hostname=host)