davidpryke / gitso

Automatically exported from code.google.com/p/gitso
0 stars 0 forks source link

get_gateway_addr() raises exception if no gateway is used #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to a VPN which assigns you a public IP (e.g. University)
2. All Traffic is routed through the tunnel but no gateway is specified
3. NATPMP.py Line 217: "match = pattern.search(system_out)" -- fails and 
NATPMPNetworkError is thrown 

What is the expected output? What do you see instead?
No Stacktrace on execution - Should work without any gateway

What version of the product are you using? On what operating system?
Gitos 0.6 - on linux

Please provide any additional information below.
Stacktrace:

Traceback (most recent call last):
  File "/usr/bin/gitso", line 6, in <module>
    from Gitso import ConnectionWindow, ArgsParser
  File "/usr/bin/../share/gitso/Gitso.py", line 52, in <module>
    import ConnectionWindow, ArgsParser
  File "/usr/bin/../share/gitso/ConnectionWindow.py", line 28, in <module>
    import AboutWindow, GitsoThread
  File "/usr/bin/../share/gitso/GitsoThread.py", line 31, in <module>
    import NATPMP
  File "/usr/bin/../share/gitso/NATPMP.py", line 246, in <module>
    def get_public_address(gateway_ip=get_gateway_addr(), retry=9):
  File "/usr/bin/../share/gitso/NATPMP.py", line 219, in get_gateway_addr
    raise NATPMPNetworkError(NATPMP_GATEWAY_CANNOT_FIND, error_str(NATPMP_GATEWAY_CANNOT_FIND))
NATPMP.NATPMPNetworkError: (-12, 'Cannot automatically determine gateway 
address.  Must specify manually.')

Original issue reported on code.google.com by nou...@gmail.com on 23 Feb 2011 at 1:55