sk2/autonetkit — Issue #70: Catch Pexpect errors
Author: sk2
Created: 2011-11-01 02:51:48+00:00
State: open

Catch pexpect errors so output is less scary:

```
INFO Loading
INFO Compiling
INFO Configuring C-BGP
INFO Configuring Junos
INFO Deploying to Netkit
INFO Connecting to netkithost
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/sk2/Dropbox/PhD/Dev/ank/AutoNetkit/console_script.py", line 113, in
main()
File "/Users/sk2/Dropbox/PhD/Dev/ank/AutoNetkit/console_script.py", line 104, in main
xterm = options.xterm)
File "AutoNetkit/internet.py", line 281, in deploy
nkd.deploy(netkit_server, netkit_dir, self.network, xterm)
File "AutoNetkit/deploy/netkit_deploy.py", line 35, in deploy
shell = self.server.get_shell()
File "AutoNetkit/netkit.py", line 77, in get_shell
self.connect_to_server()
File "AutoNetkit/netkit.py", line 116, in connect_to_server
shell.login(self.host, self.username)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pxssh.py", line 226, in login
raise ExceptionPxssh ('password refused')
pxssh.ExceptionPxssh: password refused
```