Caolan McNamara:
authorGuido van Rossum <guido@python.org>
Tue, 2 May 2000 14:32:11 +0000 (14:32 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 2 May 2000 14:32:11 +0000 (14:32 +0000)
telnetlib is unable to connect to a few telnet daemons because of
improper IAC handling, heres an attached oneliner to reject WILL
messages which will allow many more telnet daemons to work with it,
namely FreeBSD.

Lib/telnetlib.py

index efb2b4059ccdc198dd397068d7107be1899d0f1a..dfd549ede358f59ab4ff80fc080dfc52cc22d94b 100644 (file)
@@ -329,6 +329,7 @@ class Telnet:
                     opt = self.rawq_getchar()
                     self.msg('IAC %s %d',
                              c == WILL and 'WILL' or 'WONT', ord(c))
+                    self.sock.send(IAC + DONT + opt)
                 else:
                     self.msg('IAC %s not recognized' % `c`)
         except EOFError: # raised by self.rawq_getchar()