1
0
mirror of https://github.com/gryf/wicd.git synced 2026-03-06 09:15:47 +01:00

experimental:

- Use gobject.timeout_add_seconds instead of gobject.timeout_add when possible
- Merge some fixes from pluggablebackends
- Replace os.system usage with subprocess.call.
This commit is contained in:
imdano
2008-09-13 11:28:36 +00:00
parent 97e1123c8c
commit bbfcae834e
4 changed files with 24 additions and 5 deletions

View File

@@ -591,7 +591,10 @@ class WicdDaemon(dbus.service.Object):
print "Attempting to autoconnect with wired interface..."
self.auto_connecting = True
time.sleep(1.5)
gobject.timeout_add(3000, self._monitor_wired_autoconnect)
try:
gobject.timeout_add_seconds(3, self._monitor_wired_autoconnect)
except:
gobject.timeout_add(3000, self._monitor_wired_autoconnect)
return True
def _monitor_wired_autoconnect(self):
@@ -1025,7 +1028,7 @@ class WirelessDaemon(dbus.service.Object):
def _wireless_autoconnect(self):
""" Attempts to autoconnect to a wireless network. """
print "No wired connection present, attempting to autoconnect" + \
print "No wired connection present, attempting to autoconnect " + \
"to wireless network"
if self.wifi.wireless_interface is None:
print 'Autoconnect failed because wireless interface returned None'