add __str__ to Message

This commit is contained in:
Christophe Benz 2010-03-19 17:10:51 +01:00 committed by Christophe Benz
commit df27572d5b

View file

@ -72,6 +72,11 @@ class Message:
def is_new(self):
return self.new
def __str__(self):
result = '<Message title="%s" date="%s" from="%s" content="%s">' % (
self.title, self.date, self.sender, self.content)
return result.encode('utf-8')
class ICapMessages:
def iter_new_messages(self, thread=None):
"""