diff options
Diffstat (limited to 'Lib/telnetlib.py')
-rw-r--r-- | Lib/telnetlib.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index 51738f0..72dabc7 100644 --- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -36,10 +36,7 @@ To do: import sys import socket import selectors -try: - from time import monotonic as _time -except ImportError: - from time import time as _time +from time import monotonic as _time __all__ = ["Telnet"] @@ -265,8 +262,8 @@ class Telnet: def close(self): """Close the connection.""" sock = self.sock - self.sock = 0 - self.eof = 1 + self.sock = None + self.eof = True self.iacseq = b'' self.sb = 0 if sock: |