Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38bf87c

Browse files
committed
Issue #21994: Fix SyntaxError in the SSLContext.check_hostname documentation.
1 parent 2c6a3ae commit 38bf87c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/ssl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,8 +1220,8 @@ to speed up repeated connections from the same clients.
12201220
context.load_default_certs()
12211221

12221222
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1223-
ssl_sock = context.wrap_socket(s, server_hostname='www.verisign.com'):
1224-
ssl_sock.connect(('www.verisign.com', 443))
1223+
ssl_sock = context.wrap_socket(s, server_hostname='www.verisign.com')
1224+
ssl_sock.connect(('www.verisign.com', 443))
12251225

12261226
.. versionadded:: 3.4
12271227

0 commit comments

Comments
 (0)