summaryrefslogtreecommitdiff
path: root/src/leap/base/checks.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-18 02:19:03 +0900
committerkali <kali@leap.se>2012-10-18 02:19:03 +0900
commit17896b9f9cbfbca7bc0a0344050dddea8ba61880 (patch)
tree47a708e0a77a176c414cee69ce3001f5af5c60dc /src/leap/base/checks.py
parent28dcbfbc6e3a61d47c2a1218bce5d2693c77d04d (diff)
parentf6e900f024074435349eb778a2d89baed55e1e6c (diff)
Merge branch 'develop' into feature/generic-wizard
Diffstat (limited to 'src/leap/base/checks.py')
-rw-r--r--src/leap/base/checks.py23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/leap/base/checks.py b/src/leap/base/checks.py
index 84f9dd46..7285e74f 100644
--- a/src/leap/base/checks.py
+++ b/src/leap/base/checks.py
@@ -16,13 +16,9 @@ class LeapNetworkChecker(object):
"""
all network related checks
"""
- # #718
- # XXX get provider gateway as a parameter
- # for constructor.
- # def __init__(self, *args, **kwargs):
- # ...
- # provider_gw = kwargs.pop('provider_gw', None)
- # self.provider_gateway = provider_gw
+ def __init__(self, *args, **kwargs):
+ provider_gw = kwargs.pop('provider_gw', None)
+ self.provider_gateway = provider_gw
def run_all(self, checker=None):
if not checker:
@@ -34,15 +30,8 @@ class LeapNetworkChecker(object):
checker.check_internet_connection()
checker.is_internet_up()
- # XXX We are pinging the default gateway for our connection right?
- # kali: 2012-10-05 20:59 -- I think we should get
- # also the default gateway and ping it instead.
- checker.ping_gateway()
-
- # something like: ?
- # see __init__ above
- # if self.provider_gateway:
- # checker.ping_gateway(self.provider_gateway)
+ if self.provider_gateway:
+ checker.ping_gateway(self.provider_gateway)
def check_internet_connection(self):
try:
@@ -65,7 +54,7 @@ class LeapNetworkChecker(object):
def is_internet_up(self):
iface, gateway = self.get_default_interface_gateway()
- self.ping_gateway(self)
+ self.ping_gateway(self.provider_gateway)
def check_tunnel_default_interface(self):
"""