diff options
Diffstat (limited to 'slixmpp/xmlstream/stanzabase.py')
-rw-r--r-- | slixmpp/xmlstream/stanzabase.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/slixmpp/xmlstream/stanzabase.py b/slixmpp/xmlstream/stanzabase.py index f45e4b96..925f2abc 100644 --- a/slixmpp/xmlstream/stanzabase.py +++ b/slixmpp/xmlstream/stanzabase.py @@ -745,6 +745,8 @@ class ElementBase(object): getattr(self, set_method)(value, **kwargs) else: if attrib in self.sub_interfaces: + if isinstance(value, JID): + value = str(value) if lang == '*': return self._set_all_sub_text(attrib, value, @@ -863,6 +865,8 @@ class ElementBase(object): if value is None or value == '': self.__delitem__(name) else: + if isinstance(value, JID): + value = str(value) self.xml.attrib[name] = value def _del_attr(self, name): @@ -1497,12 +1501,7 @@ class StanzaBase(ElementBase): self.name) def send(self): - """Queue the stanza to be sent on the XML stream. - - :param bool now: Indicates if the queue should be skipped and the - stanza sent immediately. Useful for stream - initialization. Defaults to ``False``. - """ + """Queue the stanza to be sent on the XML stream.""" self.stream.send(self) def __copy__(self): |