Author: damoxc

Revision: 5686

Log:
        fix returning the call when the method doesn't return a deferred

Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py     2009-08-20 00:12:41 UTC (rev 5685)
+++ trunk/deluge/ui/web/json_api.py     2009-08-20 00:27:34 UTC (rev 5686)
@@ -233,6 +233,7 @@
             d.addErrback(self._on_rpc_request_failed, response, request)
             return d
         else:
+            response["result"] = d
             return self._send_response(request, response)
 
     def _on_json_request_failed(self, reason, request):
@@ -702,10 +703,23 @@
         :rtype: dictionary
         :returns: the configuration
         """
-        
         config = component.get("DelugeWeb").config.config.copy()
         del config["sessions"]
         del config["pwd_salt"]
         del config["pwd_sha1"]
         return config
-        
\ No newline at end of file
+    
+
+    @export
+    def set_config(self, config):
+        """
+        Sets the configuration dictionary for the web interface.
+        
+        :param config: The configuration options to update
+        :type config: dictionary
+        """
+        web_config = component.get("DelugeWeb").config
+        for key in config.keys():
+            if isinstance(config[key], unicode) or isinstance(config[key], 
str):
+                config[key] = config[key].encode("utf8")
+            web_config[key] = config[key]
\ No newline at end of file



--~--~---------~--~----~------------~-------~--~----~
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