1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-07 06:14:16 +01:00

Moved StopWPA functions up to superclasses.

This commit is contained in:
Joe MacMahon
2012-01-29 04:05:16 +00:00
parent 0bf1a68353
commit b81941bd7e
2 changed files with 18 additions and 14 deletions

View File

@@ -518,6 +518,12 @@ class ConnectThread(threading.Thread):
finally:
self.lock.release()
@abortable
def stop_wpa(self, iface):
""" Stops wpa_supplicant. """
print 'Stopping wpa_supplicant'
iface.StopWPA()
@abortable
def put_iface_up(self, iface):
""" Bring up given interface. """
@@ -968,13 +974,6 @@ class WirelessConnectThread(ConnectThread):
self.abort_connection('association_failed')
else:
print 'not verifying'
@abortable
def stop_wpa(self, wiface):
""" Stops wpa_supplicant. """
print 'Stopping wpa_supplicant'
wiface.StopWPA()
@abortable
def generate_psk_and_authenticate(self, wiface):
@@ -1073,6 +1072,10 @@ class Wired(Controller):
def Disconnect(self):
Controller.Disconnect(self, 'wired', 'wired', 'wired')
self.StopWPA()
def StopWPA(self):
self.liface.StopWPA()
def DetectWiredInterface(self):
""" Attempts to automatically detect a wired interface. """
@@ -1143,6 +1146,7 @@ class WiredConnectThread(ConnectThread):
self.put_iface_down(liface)
self.release_dhcp_clients(liface)
self.reset_ip_addresses(liface)
self.stop_wpa(liface)
self.flush_routes(liface)
# Bring up interface.