mirror of
https://github.com/gryf/wicd.git
synced 2026-01-04 21:04:15 +01:00
Merged r306 of mainline 1.6
This commit is contained in:
@@ -335,14 +335,16 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface):
|
|||||||
def _connect_to_wpa_ctrl_iface(self):
|
def _connect_to_wpa_ctrl_iface(self):
|
||||||
""" Connect to the wpa ctrl interface. """
|
""" Connect to the wpa ctrl interface. """
|
||||||
ctrl_iface = '/var/run/wpa_supplicant'
|
ctrl_iface = '/var/run/wpa_supplicant'
|
||||||
try:
|
socket_loc = os.path.join(ctrl_iface, self.iface)
|
||||||
socket = [os.path.join(ctrl_iface, s) \
|
if os.path.exists(socket_loc):
|
||||||
for s in os.listdir(ctrl_iface) if s == self.iface][0]
|
try:
|
||||||
except OSError, error:
|
return wpactrl.WPACtrl(socket)
|
||||||
print error
|
except wpactrl.error, e:
|
||||||
|
print "Couldn't open ctrl_interface: %s" % e
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
print "Couldn't find a wpa_supplicant ctrl_interface for iface %s" % self.iface
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return wpactrl.WPACtrl(socket)
|
|
||||||
|
|
||||||
def ValidateAuthentication(self, auth_time):
|
def ValidateAuthentication(self, auth_time):
|
||||||
""" Validate WPA authentication.
|
""" Validate WPA authentication.
|
||||||
|
|||||||
Reference in New Issue
Block a user