Author: damoxc
Revision: 4899
Log:
fix status when a host is connected
Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py 2009-03-20 18:55:54 UTC (rev 4898)
+++ trunk/deluge/ui/web/json_api.py 2009-03-20 19:00:11 UTC (rev 4899)
@@ -414,14 +414,14 @@
host_id, host, port, user, password = host[0:5]
hosts[host_id][3:4] = (None, None)
- if client.connected() and \
- (host, port, user) == client.connection_info():
+ if client.connected() and (host, port, "localclient" if not \
+ user and host in ("127.0.0.1", "localhost") else \
+ user) == client.connection_info():
def on_info(info):
hosts[host_id][4] = info
run_check()
- host[5] = _("Connected")
+ hosts[host_id][3] = _("Connected")
client.daemon.info().addCallback(on_info)
- hosts[host_id] = host
continue
c = Client()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---