- fix issue #6106, Telnet.process_rawq default handling of WILL/WONT/DO/DONT
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 11e1a65..5258c8a 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -459,7 +459,7 @@
                             # unless we did a WILL/DO before.
                             self.msg('IAC %d not recognized' % ord(c))
                 elif len(self.iacseq) == 2:
-                    cmd = self.iacseq[1]
+                    cmd = self.iacseq[1:2]
                     self.iacseq = b''
                     opt = c
                     if cmd in (DO, DONT):