Commit d5256e15 authored by Pawel Wodkowski's avatar Pawel Wodkowski Committed by Ben Walker
Browse files

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: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/435506


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 88a2ee92
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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):