Improve test for ssl
This commit is contained in:
1 parent
acc3e1990c
commit
722fcb0a46
1 file changed
+3
-2
+3
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user