add __str__ to Message
This commit is contained in:
parent
bcd63ee3e7
commit
df27572d5b
1 changed files with 5 additions and 0 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue