]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix SF bug #593696 telnetlib raises UnboundLocalError
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 11 Aug 2002 20:07:38 +0000 (20:07 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 11 Aug 2002 20:07:38 +0000 (20:07 +0000)
Backported from:

revision 1.18
SF 554073.  Fix typo in error reporting of unrecognized character
following IAC.  Bugfix candidate if anyone cares.

Lib/telnetlib.py

index cdbbd9f5cc744e4da86bbcd697d5fddcd6325c3a..656e97b7bbcdd2dc492b5fc23bc5484e76d6ec34 100644 (file)
@@ -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