diff --git a/jsonrpc/__init__.py b/jsonrpc/__init__.py index e24eb11..e4d84b8 100644 --- a/jsonrpc/__init__.py +++ b/jsonrpc/__init__.py @@ -41,9 +41,13 @@ class Method: self.handler = handler self.fields = fields - def __call__(self, queries): + def __call__(self, query): if self.handler is None: return self.function() + def wrap(function): + # print(func) + return function + return wrap return self.function() @@ -155,7 +159,10 @@ class JSONRPC: try: if method.handler is None: - pass + method.handler( + query + method.function + ) if params is None: response = method.function() elif isinstance(params, list):