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

Only show valid wpa_supplicant drivers in the GUI.

Don't needlessly created PreferenceDialog objects.
Use dbus signals to alert the UI that the daemon is back up, instead of polling.
This commit is contained in:
Dan O'Reilly
2008-12-16 00:48:47 -05:00
parent 318024a123
commit ba3bc2afc2
8 changed files with 149 additions and 118 deletions

View File

@@ -131,6 +131,16 @@ def NeedsExternalCalls():
""" Returns True if the backend needs to use an external program. """
raise NotImplementedError
def IsValidWpaSuppDriver(driver):
""" Returns True if given string is a valid wpa_supplicant driver. """
output = misc.Run(["wpa_supplicant", "-D%s" % driver, "-iwlan9",
"-c/etc/zzzzzzzz.confzzz"])
if re.match("Unsupported driver", output):
return False
else:
return True
class BaseInterface(object):
""" Control a network interface. """