summaryrefslogtreecommitdiff
path: root/Lib/telnetlib.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-10-26 12:47:19 +0000
committerR. David Murray <rdmurray@bitdance.com>2010-10-26 12:47:19 +0000
commit606fab94cbc350f753b77394d584ebc75ba85952 (patch)
tree24891a8105910c55eb4d61f1c881ee2034d9e0de /Lib/telnetlib.py
parent643e818627d8772b36ff0399b7784a447af281a6 (diff)
downloadcpython-606fab94cbc350f753b77394d584ebc75ba85952.tar.gz
Merged revisions 85846 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85846 | r.david.murray | 2010-10-26 08:42:24 -0400 (Tue, 26 Oct 2010) | 2 lines #7761: fix telnetlib.interact failures on Windows. ........
Diffstat (limited to 'Lib/telnetlib.py')
-rw-r--r--Lib/telnetlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 5258c8ad20..c60578debf 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()