From 2fc4d581baaa1ec1cb68f5d9b093e1d1d03830bc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 19 Feb 1998 21:19:48 +0000 Subject: [PATCH] Added debug statements to report data actually sent and received on the socket. --- Lib/telnetlib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index 4784a6988e8..2012e16d41e 100644 --- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -188,6 +188,7 @@ class Telnet: """ if IAC in buffer: buffer = string.replace(buffer, IAC, IAC+IAC) + self.msg("send %s", `buffer`) self.sock.send(buffer) def read_until(self, match, timeout=None): @@ -365,6 +366,7 @@ class Telnet: # The buffer size should be fairly small so as to avoid quadratic # behavior in process_rawq() above buf = self.sock.recv(50) + self.msg("recv %s", `buf`) self.eof = (not buf) self.rawq = self.rawq + buf