Ich bin dabei ein altes Python2 Programm auf Python3 umzuschreiben.
Ich bekomme da diese Warnung:
/local/home/framstag/python/./fexit.py:905: DeprecationWarning:
ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket()
Der Code an dieser Stelle ist:
sock = ssl.wrap_socket(sock)
Wenn ich das aendere in:
sock = ssl.SSLContext.wrap_socket(sock)
bricht mir das Programm ab mit dieser Fehlermeldung:
File "/local/home/framstag/python/./fexit.py", line 905, in http_connect
sock = ssl.SSLContext.wrap_socket(sock)
TypeError: SSLContext.wrap_socket() missing 1 required positional argument:
'sock'
Ich hab da wohl was nicht verstanden. Wie gehts richtig?
sock hatte ich so erzeugt:
sock = socket.create_connection((server,port))
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: [email protected]
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: https://www.tik.uni-stuttgart.de/
_______________________________________________
python-de Mailingliste -- [email protected]
Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an
[email protected]
https://mail.python.org/mailman3/lists/python-de.python.org/
Mitgliedsadresse: [email protected]