From: Neal Norwitz Date: Sun, 11 Aug 2002 20:07:38 +0000 (+0000) Subject: Fix SF bug #593696 telnetlib raises UnboundLocalError X-Git-Tag: v2.2.2b1~224 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa1cf942d9702326062b54489271a1af284178ad;p=thirdparty%2FPython%2Fcpython.git Fix SF bug #593696 telnetlib raises UnboundLocalError Backported from: revision 1.18 SF 554073. Fix typo in error reporting of unrecognized character following IAC. Bugfix candidate if anyone cares. --- diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index cdbbd9f5cc74..656e97b7bbcd 100644 --- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -421,7 +421,7 @@ class Telnet: else: self.sock.sendall(IAC + DONT + opt) else: - self.msg('IAC %d not recognized' % ord(opt)) + self.msg('IAC %d not recognized' % ord(c)) except EOFError: # raised by self.rawq_getchar() pass self.cookedq = self.cookedq + buf