trigger/trigger — pull request #157 by matejv (2014-01-09 12:18:22+00:00)
Title: TriggerTelnetClientFactory was missing device attribute

gong fallback from SSH to telnet is broken in current revision of develop branch:

```
[nms@test-network trigger]$ gong c1941
Connecting to c1941. Use ^X to exit.

Fetching credentials from /home/nms/.tacacsrc
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/twisted/python/log.py", line 88, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.6/site-packages/twisted/python/log.py", line 73, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python2.6/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.6/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- ---
File "/usr/lib/python2.6/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib/python2.6/site-packages/twisted/internet/tcp.py", line 215, in doRead
return self._dataReceived(data)
File "/usr/lib/python2.6/site-packages/twisted/internet/tcp.py", line 221, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/usr/lib/python2.6/site-packages/twisted/conch/telnet.py", line 588, in dataReceived
self.applicationDataReceived(''.join(appDataBuffer))
File "build/bdist.linux-i686/egg/trigger/twister.py", line 1536, in login_state_machine

File "build/bdist.linux-i686/egg/trigger/twister.py", line 1581, in state_logged_in

File "build/bdist.linux-i686/egg/trigger/twister.py", line 1007, in connectionMade

exceptions.AttributeError: 'TriggerTelnetClientFactory' object has no attribute 'device'
```

This fix works for me.