fixes #1514, thanks RekGRpth

This commit is contained in:
mdipierro
2017-06-20 14:59:57 -05:00
parent 159dd0d022
commit 81fa787ec2

View File

@@ -105,14 +105,14 @@ class ServerProxy(object):
def __getattr__(self, attr):
"pseudo method that can be called"
return lambda *args: self.call(attr, *args)
return lambda *args, **vars: self.call(attr, *args, **vars)
def call(self, method, *args):
def call(self, method, *args, **vars):
"JSON RPC communication (method invocation)"
# build data sent to the service
request_id = random.randint(0, sys.maxsize)
data = {'id': request_id, 'method': method, 'params': args, }
data = {'id': request_id, 'method': method, 'params': args or vars, }
if self.version:
data['jsonrpc'] = self.version #mandatory key/value for jsonrpc2 validation else err -32600
request = json.dumps(data)