#7761: fix telnetlib.interact failures on Windows.

This commit is contained in:
R. David Murray 2010-10-26 12:42:24 +00:00
parent 123015e10a
commit ba488d1504
2 changed files with 4 additions and 2 deletions

View File

@ -552,7 +552,7 @@ class Telnet:
line = sys.stdin.readline()
if not line:
break
self.write(line)
self.write(line.encode('ascii'))
def listener(self):
"""Helper for mt_interact() -- this executes in the other thread."""
@ -563,7 +563,7 @@ class Telnet:
print('*** Connection closed by remote host ***')
return
if data:
sys.stdout.write(data)
sys.stdout.write(data.decode('ascii'))
else:
sys.stdout.flush()

View File

@ -51,6 +51,8 @@ Core and Builtins
Library
-------
- #7761: telnetlib.interact failures on Windows fixed.
- logging: Added style option to Formatter to allow %, {} or $-formatting.
- Issue #5178: Added tempfile.TemporaryDirectory class that can be used