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:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user