again correct management of null id.

This commit is contained in:
Michele Comitini
2013-01-20 00:07:12 +01:00
parent d17f3bedd3
commit 795886d2f2
+2 -2
View File
@@ -4403,7 +4403,7 @@ class Service(object):
except Service.JsonRpcException, e:
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:
return return_error(id, -32601, data='Method "%s" does not exist' % method)
try:
@@ -4413,7 +4413,7 @@ class Service(object):
s = methods[method](*params)
if hasattr(s, 'as_list'):
s = s.as_list()
if not must_respond:
if must_respond:
return return_response(id, s)
else:
return