Changeset 766

Show
Ignore:
Timestamp:
08/12/08 02:32:48 (3 months ago)
Author:
sylvain
Message:

Fix #21

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • oss/headstock/headstock/api/im.py

    r753 r766  
    4040        self.lang = lang 
    4141 
     42    def __str__(self): 
     43        return str(self.content or '') 
     44 
     45    def __unicode__(self): 
     46        return self.context or u'' 
     47 
    4248    def __repr__(self): 
    4349        return '<Subject at %s>' % (hex(id(self)),) 
     
    4955    def __repr__(self): 
    5056        return '<Thread at %s>' % (hex(id(self)),) 
     57 
     58    def __str__(self): 
     59        return str(self.text or '') 
     60 
     61    def __unicode__(self): 
     62        return self.text or u'' 
    5163 
    5264class Event(object): 
     
    154166 
    155167        if m.thread: 
    156             E(u'thread', content=m.thread
     168            E(u'thread', content=unicode(m.thread)
    157169              namespace=XMPP_CLIENT_NS, parent=e) 
    158170