[3.12] gh-118042: Fix error in Telnet.__del__ when __init__() was not called (GH-118274)

This commit is contained in:
Serhiy Storchaka 2024-04-26 08:53:54 +03:00 committed by GitHub
parent 82e26d6bd0
commit 8e3bd342f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -195,6 +195,7 @@ class Telnet:
No other action is done afterwards by telnetlib.
"""
sock = None # for __del__()
def __init__(self, host=None, port=0,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT):