From b8b8ba2d5da2892b5d85b1a04881b9ce902a063d Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Tue, 1 Dec 2009 23:35:45 -0500 Subject: [PATCH] Remove the 'wired' wpa_supplicant driver from the list of drivers returned from GetWpaSupplicantDrivers(). --- wicd/wnettools.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 1cf8568..df69597 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -165,8 +165,11 @@ def GetWpaSupplicantDrivers(): print "Warning: Couldn't get list of valid wpa_supplicant drivers" return [""] patt = re.compile("(\S+)\s+=.*") - return patt.findall(output) or [""] - + drivers = patt.findall(output) or [""] + # We cannot use the "wired" driver for wireless interfaces. + if 'wired' in rval: + drivers.remove('wired') + return drivers def IsValidWpaSuppDriver(driver): """ Returns True if given string is a valid wpa_supplicant driver. """ output = misc.Run(["wpa_supplicant", "-D%s" % driver, "-iolan19",