Author: damoxc

Revision: 5655

Log:
        fix calling core methods

Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py     2009-08-12 00:09:22 UTC (rev 5654)
+++ trunk/deluge/ui/web/json_api.py     2009-08-12 00:10:07 UTC (rev 5655)
@@ -158,13 +158,13 @@
             return meth(*params)
         raise JSONException("Unknown system method")
 
-    def _exec_remote(self, method, params):
+    def _exec_remote(self, method, params, request):
         """
         Executes methods using the Deluge client.
         """
         component.get("Auth").check_request(request, level=AUTH_LEVEL_DEFAULT)
-        component, method = method.split(".")
-        return getattr(getattr(client, component), method)(*params)
+        core_component, method = method.split(".")
+        return getattr(getattr(client, core_component), method)(*params)
 
     def _handle_request(self, request):
         """
@@ -190,7 +190,7 @@
             if method.startswith("system.") or method in self._local_methods:
                 result = self._exec_local(method, params, request)
             elif method in self._remote_methods:
-                result = self._exec_remote(method, params)
+                result = self._exec_remote(method, params, request)
             else:
                 error = {"message": "Unknown method", "code": 2}
         except AuthError, e:



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