Author: damoxc
Revision: 6166
Log:
use get_host() in connect()
Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py 2010-01-29 11:04:26 UTC (rev 6165)
+++ trunk/deluge/ui/web/json_api.py 2010-01-29 15:35:51 UTC (rev 6166)
@@ -419,9 +419,8 @@
d = Deferred()
def on_connected(methods):
d.callback(methods)
- for host in self.host_list["hosts"]:
- if host_id != host[0]:
- continue
+ host = self.get_host(host_id)
+ if host:
self._json.connect(*host[1:]).addCallback(on_connected)
return d
--
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.