Author: andar

Revision: 5159

Log:
        Fix calling 'set_event_interest' when registering a handler after 
connecting

Diff:
Modified: trunk/deluge/ui/client.py
===================================================================
--- trunk/deluge/ui/client.py   2009-04-24 21:35:37 UTC (rev 5158)
+++ trunk/deluge/ui/client.py   2009-04-24 22:50:44 UTC (rev 5159)
@@ -322,7 +322,8 @@
             # This is a new event to handle, so we need to tell the daemon
             # that we're interested in receiving this type of event
             self.__factory.event_handlers[event] = []
-            self.call("daemon.set_event_interest", [event])
+            if self.connected:
+                self.call("daemon.set_event_interest", [event])
 
         # Only add the handler if it's not already registered
         if handler not in self.__factory.event_handlers[event]:
@@ -498,7 +499,7 @@
             import common
             username, password = common.get_localhost_auth()
 
-        self._daemon_proxy = DaemonSSLProxy(self.__event_handlers)
+        self._daemon_proxy = DaemonSSLProxy(dict(self.__event_handlers))
         self._daemon_proxy.set_disconnect_callback(self.__on_disconnect)
         d = self._daemon_proxy.connect(host, port, username, password)
         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
-~----------~----~----~----~------~----~------~--~---

Reply via email to