From ad96b144457d5683eec7836e9d0efd0c230b7ebc Mon Sep 17 00:00:00 2001 From: jkhsjdhjs Date: Sun, 16 Jul 2023 22:19:06 +0000 Subject: [PATCH] replace deprecated ssl.wrap() --- bert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bert.py b/bert.py index 30e27b5..77791e7 100755 --- a/bert.py +++ b/bert.py @@ -50,9 +50,9 @@ y = "\x038" r = "\x034" g = "\x033" - -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -irc = ssl.wrap_socket(s) +context = ssl.create_default_context() +with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: + irc = context.wrap_socket(sock, server_hostname=host) # Currency API