Improve test for ssl

This commit is contained in:
Cédric Krier committed 2008-08-19 18:08:07 +02:00
1 parent acc3e1990c
commit 722fcb0a46
1 file changed
+3 -2
+3 -2
View File
@@ -63,8 +63,9 @@ class PySocket:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(120)
sock.connect((host, int(port)))
ssl_sock = socket.ssl(sock)
self.ssl = True
if hasattr(socket, 'ssl'):
ssl_sock = socket.ssl(sock)
self.ssl = True
except:
pass
if self.ssl: