scripts/rpc: change default value from None to {}
JSONRPCClient.call recieved optional `params` value, but then `params` was used in `json.dumps` function (line #159) as a dictionary, so `None` was treated as dictionary in some cases, which resulted in TypeError. This patch fixes above issue by changing the default value from `None` to `{}`. Change-Id: I27ca0ccc2d970c0ff9e8117f02203c03e417adf0 Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462070 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
2805cad12f
commit
60bf34d1f0
@ -141,7 +141,7 @@ class JSONRPCClient(object):
|
||||
self._logger.info("response:\n%s\n", json.dumps(response, indent=2))
|
||||
return response
|
||||
|
||||
def call(self, method, params=None):
|
||||
def call(self, method, params={}):
|
||||
self._logger.debug("call('%s')" % method)
|
||||
req_id = self.send(method, params)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user