mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 20:38:00 +01:00
Optimized autoconnect for wired code (should be more log friendly)
This commit is contained in:
20
daemon.py
20
daemon.py
@@ -327,13 +327,19 @@ class ConnectionWizard(dbus.service.Object):
|
||||
return
|
||||
print "unable to find a network to autoconnect to, checking for a wired connection"
|
||||
if self.CheckPluggedIn() == True:
|
||||
if self.CheckIfWiredConnecting() == False: # Keeps us from going into an infinite connecting loop
|
||||
defaultNetwork = self.GetDefaultWiredNetwork()
|
||||
if defaultNetwork != None:
|
||||
self.ReadWiredNetworkProfile(defaultNetwork)
|
||||
self.ConnectWired()
|
||||
else:
|
||||
print "couldn't find a default wired connection, couldn't autoconnect"
|
||||
defaultNetwork = self.GetDefaultWiredNetwork()
|
||||
if defaultNetwork != None:
|
||||
self.ReadWiredNetworkProfile(defaultNetwork)
|
||||
self.ConnectWired()
|
||||
time.sleep(1)
|
||||
print "Attempting to autoconnect with wired interface..."
|
||||
while self.CheckIfWiredConnecting(): # Keeps us from going into an infinite connecting loop
|
||||
#I didn't include a self.GetWired/WirelessIP call and it seems
|
||||
#to work for me...could it cause problems? - Dan
|
||||
time.sleep(1)
|
||||
print "...done autoconnecting."
|
||||
else:
|
||||
print "couldn't find a default wired connection, couldn't autoconnect"
|
||||
else:
|
||||
print "no wired connection present, couldn't autoconnect."
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user