mirror of
https://github.com/gryf/wicd.git
synced 2026-01-03 04:14:12 +01:00
Wait for the network interface to finish coming up before moving on during the connection process.
Use a dict instead of if/elifs in StartDHCP() method.
This commit is contained in:
@@ -526,6 +526,14 @@ class ConnectThread(threading.Thread):
|
||||
print 'Putting interface up...'
|
||||
self.SetStatus('interface_up')
|
||||
iface.Up()
|
||||
for x in range(0, 5):
|
||||
time.sleep(2)
|
||||
if iface.IsUp():
|
||||
return
|
||||
self.abort_if_needed()
|
||||
|
||||
# If we get here, the interface never came up
|
||||
print "WARNING: Timed out waiting for interface to come up"
|
||||
|
||||
|
||||
class Wireless(Controller):
|
||||
@@ -769,7 +777,7 @@ class Wireless(Controller):
|
||||
iwconfig = self.GetIwconfig()
|
||||
else:
|
||||
iwconfig = None
|
||||
bssid = self.wiface.GetBSSID(iwconfig),
|
||||
bssid = self.wiface.GetBSSID(iwconfig)
|
||||
essid = self.wiface.GetCurrentNetwork(iwconfig)
|
||||
|
||||
Controller.Disconnect(self, bssid, essid)
|
||||
|
||||
Reference in New Issue
Block a user