Mercurial > libervia-backend
comparison src/tools/xml_tools.py @ 1499:adc72c39f032
tools (xml_tools): fixes JidElement.__init__
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 26 Aug 2015 12:23:55 +0200 |
parents | 55cff13b1f10 |
children | c7c872a40e56 |
comparison
equal
deleted
inserted
replaced
1498:e3330ce65285 | 1499:adc72c39f032 |
---|---|
475 @param jid_(jid.JID, unicode): jid to append | 475 @param jid_(jid.JID, unicode): jid to append |
476 """ | 476 """ |
477 assert isinstance(parent, JidsListWidget) | 477 assert isinstance(parent, JidsListWidget) |
478 super(JidElement, self).__init__(parent.xmlui, parent) | 478 super(JidElement, self).__init__(parent.xmlui, parent) |
479 if isinstance(jid_, jid.JID): | 479 if isinstance(jid_, jid.JID): |
480 value = jid.full | 480 value = jid_.full() |
481 elif isinstance(jid_, basestring): | 481 elif isinstance(jid_, basestring): |
482 value = unicode(jid_) | 482 value = unicode(jid_) |
483 else: | 483 else: |
484 raise NotImplementedError | 484 raise NotImplementedError |
485 jid_txt = self.xmlui.doc.createTextNode(value) | 485 jid_txt = self.xmlui.doc.createTextNode(value) |