]> granicus.if.org Git - python/commitdiff
Added debug statements to report data actually sent and received on
authorGuido van Rossum <guido@python.org>
Thu, 19 Feb 1998 21:19:48 +0000 (21:19 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 19 Feb 1998 21:19:48 +0000 (21:19 +0000)
the socket.

Lib/telnetlib.py

index 4784a6988e8abb7cf0c389c9bf8fd34527258bed..2012e16d41e13b742cffdb4d8bf2abd7920c3076 100644 (file)
@@ -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