summaryrefslogtreecommitdiff
path: root/heat/rpc
diff options
context:
space:
mode:
authorBo Wang <bo.wang@easystack.cn>2016-02-16 20:04:59 +0800
committerBo Wang <bo.wang@easystack.cn>2016-02-16 20:04:59 +0800
commit4136b476667845a9e564aaec6da67e10cec79035 (patch)
tree7104c62482af06bdf1dd8b79d22a8c70b05915da /heat/rpc
parent8ef79f95b7b9c19c3695c5c72c718040d25ec982 (diff)
downloadheat-4136b476667845a9e564aaec6da67e10cec79035.tar.gz
Use oslo.utils.reflection to extract class name
The oslo.utils.reflection.get_class_name() handles more variations of where a class name may come from (on) python 2 and python 3. Its usage allows getting more accurate class names so we'd better use it. Change-Id: Iff0e109a558d0185f126781369bac216da930bca
Diffstat (limited to 'heat/rpc')
-rw-r--r--heat/rpc/client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/heat/rpc/client.py b/heat/rpc/client.py
index 2efdef3c0..d9d5c3b3f 100644
--- a/heat/rpc/client.py
+++ b/heat/rpc/client.py
@@ -15,6 +15,8 @@
"""Client side of the heat engine RPC API."""
+from oslo_utils import reflection
+
from heat.common import messaging
from heat.rpc import api as rpc_api
@@ -76,7 +78,7 @@ class EngineClient(object):
:param error: Remote raised error to derive the name from.
"""
- error_name = error.__class__.__name__
+ error_name = reflection.get_class_name(error, fully_qualified=False)
return error_name.split('_Remote')[0]
def ignore_error_named(self, error, name):