mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-118042: Fix error in Telnet.__del__ when __init__() was not called (GH-118274)
This commit is contained in:
parent
82e26d6bd0
commit
8e3bd342f3
2 changed files with 3 additions and 0 deletions
|
@ -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):
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix an unraisable exception in :meth:`telnetlib.Telnet.__del__` when the
|
||||
``__init__()`` method was not called.
|
Loading…
Add table
Add a link
Reference in a new issue