From 6664bfebb9768dc4747b9e704bd94d3719d686b6 Mon Sep 17 00:00:00 2001 From: RemiZOffAlex Date: Wed, 2 Feb 2022 03:05:10 +0300 Subject: [PATCH] Update --- jsonrpc/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jsonrpc/__init__.py b/jsonrpc/__init__.py index 0ae55f0..e24eb11 100644 --- a/jsonrpc/__init__.py +++ b/jsonrpc/__init__.py @@ -53,7 +53,7 @@ class JSONRPC: def __init__(self): self.methods = {} - def method(self, name: str): + def method(self, name: str, handler = None, fields = None): """Декоратор метода """ assert len(name) > 0, 'Не указано имя метода' @@ -64,12 +64,12 @@ class JSONRPC: # )) # funcname = func.__name__ # modulename = func.__module__ - def wrap(function, handler = None, fields = None): + def wrap(function): # print(func) method = Method( function = function, - handler = None, - fields = None + handler = handler, + fields = fields ) self.methods[name] = method return function