Skip to content
Snippets Groups Projects
Commit 4badb90a authored by Antoine Lambert's avatar Antoine Lambert
Browse files

RPCClient: Fix reraise_exceptions regression

Reraising exceptions in RPCClient was not honored anymore due to a mistake
introduced in last commit.
parent f9619fb1
No related branches found
No related tags found
1 merge request!189RPCClient: Fix reraise_exceptions regression
......@@ -319,14 +319,15 @@ class RPCClient(metaclass=MetaRPCClient):
if exc_type.__name__ == data["type"]:
exception = exc_type(*data["args"])
break
# old dict encoded exception schema
# TODO: Remove that code once all servers are using new schema
if "exception" in data:
exception = RemoteException(
payload=data["exception"], response=response
)
else:
exception = RemoteException(payload=data, response=response)
# old dict encoded exception schema
# TODO: Remove that code once all servers are using new schema
if "exception" in data:
exception = RemoteException(
payload=data["exception"], response=response
)
else:
exception = RemoteException(payload=data, response=response)
else:
exception = pickle.loads(data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment