replace deprecated ssl.wrap()
This commit is contained in:
parent
74a8f3bfe7
commit
ad96b14445
6
bert.py
6
bert.py
|
@ -50,9 +50,9 @@ y = "\x038"
|
||||||
r = "\x034"
|
r = "\x034"
|
||||||
g = "\x033"
|
g = "\x033"
|
||||||
|
|
||||||
|
context = ssl.create_default_context()
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||||
irc = ssl.wrap_socket(s)
|
irc = context.wrap_socket(sock, server_hostname=host)
|
||||||
|
|
||||||
|
|
||||||
# Currency API
|
# Currency API
|
||||||
|
|
Loading…
Reference in New Issue
Block a user