diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-10-26 12:42:24 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-10-26 12:42:24 (GMT) |
commit | ba488d150492aa6ded31da7b055cd85a152dd611 (patch) | |
tree | 99900a631f328199fccac457e27482446f88ec26 | |
parent | 123015e10ac4ed9b1e9284984f165b9c60fb778f (diff) | |
download | cpython-ba488d150492aa6ded31da7b055cd85a152dd611.zip cpython-ba488d150492aa6ded31da7b055cd85a152dd611.tar.gz cpython-ba488d150492aa6ded31da7b055cd85a152dd611.tar.bz2 |
#7761: fix telnetlib.interact failures on Windows.
-rw-r--r-- | Lib/telnetlib.py | 4 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index 5258c8a..c60578d 100644 --- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -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() @@ -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 |