1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-20 04:48:00 +01:00

Made calls to Autoconnect outside the daemon asynchronous.

Removed some unnecessary print statements.
Added checks to the daemon and configscript.py to make sure the user opening it is root.
Fixed formatting problems in class definitions in wicd.py
This commit is contained in:
imdano
2008-03-13 14:10:49 +00:00
parent a7c22b9724
commit 04b67e9b2e
7 changed files with 44 additions and 28 deletions

View File

@@ -24,8 +24,15 @@ bus = dbus.SystemBus()
proxy_obj = bus.get_object('org.wicd.daemon', '/org/wicd/daemon')
daemon = dbus.Interface(proxy_obj, 'org.wicd.daemon')
def reply_handle(r):
pass
def error_handle(e):
pass
print daemon.Hello()
time.sleep(3)
daemon.SetSuspend(False)
if daemon.CheckIfConnecting() == False:
print daemon.AutoConnect(True)
daemon.SetForcedDisconnect(False)
if not daemon.CheckIfConnecting():
print daemon.AutoConnect(True, reply_handler=reply_handle,
error_handler=error_handle)