Use the class name instead of the TYPE property in __str__

Change-Id: Ie6fc31b0c89b9eaf9fabc1feb17d697edc5ff522
This commit is contained in:
Joshua Harlow
2015-03-17 10:04:03 -07:00
parent f8af1289c9
commit 6671ce4708

View File

@@ -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):