again correct management of null id.
This commit is contained in:
+2
-2
@@ -4403,7 +4403,7 @@ class Service(object):
|
|||||||
except Service.JsonRpcException, e:
|
except Service.JsonRpcException, e:
|
||||||
return return_error(None, e.code, e.info)
|
return return_error(None, e.code, e.info)
|
||||||
|
|
||||||
id, method, params = data['id'], data['method'], data.get('params', '')
|
id, method, params = data.get('id'), data['method'], data.get('params', '')
|
||||||
if not method in methods:
|
if not method in methods:
|
||||||
return return_error(id, -32601, data='Method "%s" does not exist' % method)
|
return return_error(id, -32601, data='Method "%s" does not exist' % method)
|
||||||
try:
|
try:
|
||||||
@@ -4413,7 +4413,7 @@ class Service(object):
|
|||||||
s = methods[method](*params)
|
s = methods[method](*params)
|
||||||
if hasattr(s, 'as_list'):
|
if hasattr(s, 'as_list'):
|
||||||
s = s.as_list()
|
s = s.as_list()
|
||||||
if not must_respond:
|
if must_respond:
|
||||||
return return_response(id, s)
|
return return_response(id, s)
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user