Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch exceptions #1

Closed
0x64746b opened this issue Nov 24, 2011 · 3 comments
Closed

Catch exceptions #1

0x64746b opened this issue Nov 24, 2011 · 3 comments

Comments

@0x64746b
Copy link
Owner

Handle exceptions around calls to bins (e.g. 2 devices present => need adb -s)

@0x64746b
Copy link
Owner Author

adb not in $PATH:

# python andreth.py
enabling IPv4 forwarding
configuring firewall
setting up PPP tunnel
Traceback (most recent call last):
  File "andreth.py", line 223, in <module>
    main(args)
  File "andreth.py", line 181, in main
    establish_tunnel(args.local_ip, args.remote_ip)
  File "andreth.py", line 106, in establish_tunnel
    subprocess.check_call(tunnel_cmd)
  File "/usr/lib/python2.7/subprocess.py", line 499, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 486, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory


closing tunnel
ERROR: Could not destroy tunnel device
disabling IPv4 forwarding
reverting firewall rules

@6E006B
Copy link
Contributor

6E006B commented Feb 10, 2012

second that ;)

@0x64746b
Copy link
Owner Author

second that ;)

# Permission to use, copy, modify, and distribute this software

patches welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants