From: Guido van Rossum Date: Tue, 2 May 2000 14:32:11 +0000 (+0000) Subject: Caolan McNamara: X-Git-Tag: v2.0b1~1884 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=823eb4ba817213698f0ac197cdcd4e56b738c32b;p=thirdparty%2FPython%2Fcpython.git Caolan McNamara: 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. --- diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index efb2b4059ccd..dfd549ede358 100644 --- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -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()