Ticket #5246 defect closed fixed
twisted.conch.stdio crashes on some unprintable characters
| Reported by: | djfroofy | Owned by: | exarkun |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | conch | Keywords: | |
| Cc: | z3p | Branch: | branches/recvline-fnkeys-5246 |
| Author: | djfroofy | Launchpad Bug: |
Description
This appears to only affect python2.7 and latter version but hitting any function key (F1 etc.), PgUp, PgDn, etc will crash a conch stdio session with the following traceback:
2011-09-01 21:24:41-0400 [-] Unhandled Error
Traceback (most recent call last):
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 146, in _doReadOrWrite
why = getattr(selectable, method)()
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/internet/process.py", line 257, in doRead
return fdesc.readFromFD(self.fd, self.dataReceived)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/internet/fdesc.py", line 94, in readFromFD
callback(output)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/internet/process.py", line 260, in dataReceived
self.proc.childDataReceived(self.name, data)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/internet/_posixstdio.py", line 89, in childDataReceived
self.protocol.dataReceived(data)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/conch/insults/insults.py", line 445, in dataReceived
self._handleControlSequence(''.join(self.escBuf) + ch)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/conch/insults/insults.py", line 465, in _handleControlSequence
f(self, self.terminalProtocol, buf[:-1])
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/conch/insults/insults.py", line 564, in tilde
handler.keystrokeReceived(map[v], None)
File "/home/drew/Envs/snd/local/lib/python2.7/site-packages/twisted/conch/recvline.py", line 201, in keystrokeReceived
elif keyID in string.printable:
exceptions.TypeError: 'in <string>' requires string as left operand, not _const
2011-09-01 21:24:42-0400 [-] Main loop terminated.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

