test: fix iSCSI target RPC config test for Python3
Python3 Exception don't have 'message' attribute so need to add it in RpcException class. This attribute has beed dropped in pep-0352. We should switch to str(e) instead in other places too. Change-Id: I610696b9e374e11ffa95327af6a10c6874915022 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/435506 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
88a2ee92dc
commit
d5256e152d
@ -49,9 +49,10 @@ rpc_param = {
|
||||
|
||||
class RpcException(Exception):
|
||||
|
||||
def __init__(self, retval, *args):
|
||||
super(RpcException, self).__init__(*args)
|
||||
def __init__(self, retval, msg):
|
||||
super(RpcException, self).__init__(msg)
|
||||
self.retval = retval
|
||||
self.message = msg
|
||||
|
||||
|
||||
class spdk_rpc(object):
|
||||
|
Loading…
Reference in New Issue
Block a user