From 6671ce47083f445df7e7e43765f09e4ff264cc81 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 17 Mar 2015 10:04:03 -0700 Subject: [PATCH] Use the class name instead of the TYPE property in __str__ Change-Id: Ie6fc31b0c89b9eaf9fabc1feb17d697edc5ff522 --- taskflow/engines/worker_based/protocol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taskflow/engines/worker_based/protocol.py b/taskflow/engines/worker_based/protocol.py index 934f837f..1ecfcef2 100644 --- a/taskflow/engines/worker_based/protocol.py +++ b/taskflow/engines/worker_based/protocol.py @@ -106,7 +106,8 @@ class Message(object): """Base class for all message types.""" def __str__(self): - return "<%s> %s" % (self.TYPE, self.to_dict()) + cls_name = reflection.get_class_name(self, fully_qualified=False) + return "<%s> %s" % (cls_name, self.to_dict()) @abc.abstractmethod def to_dict(self):