1
0
mirror of https://github.com/gryf/wicd.git synced 2026-03-14 05:35:49 +01:00

- Replace some tabs that snuck in with spaces.

- Try to validate successful association with static IPs by pinging the gateway specified.
This commit is contained in:
Dan O'Reilly
2009-03-21 16:28:40 -04:00
parent 518e0ec358
commit 34832775c8
6 changed files with 132 additions and 92 deletions

View File

@@ -585,6 +585,17 @@ class BaseInterface(object):
output = ifconfig
return misc.RunRegex(ip_pattern, output)
def VerifyAPAssociation(self, gateway):
""" Verify assocation with an access point.
Verifies that an access point can be contacted by
trying to ping it.
"""
cmd = "ping -q -w 3 -c 1 %s" % gateway
if self.verbose: print cmd
return misc.LaunchAndWait(cmd)
def IsUp(self, ifconfig=None):
""" Determines if the interface is up.