From 0912900042f777f2c31776aaedd8325e60287f33 Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Tue, 26 Mar 2013 16:48:39 +0000 Subject: rpc: fix positional args in remote exceptions Fixes bug #1160475. Positional arguments were dropped during the deserialization of valid remote exceptions, while keyword arguments are correctly supplied. Change-Id: I7b95fc4ed3fb9e5c75f5711ed6aace7aa5593727 --- openstack/common/rpc/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstack/common/rpc/common.py') diff --git a/openstack/common/rpc/common.py b/openstack/common/rpc/common.py index 42aaf09..6fb39e1 100644 --- a/openstack/common/rpc/common.py +++ b/openstack/common/rpc/common.py @@ -339,7 +339,7 @@ def deserialize_remote_exception(conf, data): if not issubclass(klass, Exception): raise TypeError("Can only deserialize Exceptions") - failure = klass(**failure.get('kwargs', {})) + failure = klass(*failure.get('args', []), **failure.get('kwargs', {})) except (AttributeError, TypeError, ImportError): return RemoteError(name, failure.get('message'), trace) -- cgit