Commit ba488d15 authored by R. David Murray's avatar R. David Murray

#7761: fix telnetlib.interact failures on Windows.

parent 123015e1
...@@ -552,7 +552,7 @@ class Telnet: ...@@ -552,7 +552,7 @@ class Telnet:
line = sys.stdin.readline() line = sys.stdin.readline()
if not line: if not line:
break break
self.write(line) self.write(line.encode('ascii'))
def listener(self): def listener(self):
"""Helper for mt_interact() -- this executes in the other thread.""" """Helper for mt_interact() -- this executes in the other thread."""
...@@ -563,7 +563,7 @@ class Telnet: ...@@ -563,7 +563,7 @@ class Telnet:
print('*** Connection closed by remote host ***') print('*** Connection closed by remote host ***')
return return
if data: if data:
sys.stdout.write(data) sys.stdout.write(data.decode('ascii'))
else: else:
sys.stdout.flush() sys.stdout.flush()
......
...@@ -51,6 +51,8 @@ Core and Builtins ...@@ -51,6 +51,8 @@ Core and Builtins
Library Library
------- -------
- #7761: telnetlib.interact failures on Windows fixed.
- logging: Added style option to Formatter to allow %, {} or $-formatting. - logging: Added style option to Formatter to allow %, {} or $-formatting.
- Issue #5178: Added tempfile.TemporaryDirectory class that can be used - Issue #5178: Added tempfile.TemporaryDirectory class that can be used
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment