Commit 60bf34d1 authored by Vitaliy Mysak's avatar Vitaliy Mysak Committed by Darek Stojaczyk
Browse files

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: default avatarVitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462070


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 2805cad1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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: