summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 51966a4e..d7c7c7b4 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -1014,9 +1014,13 @@ class StanzaBase(ElementBase):
Add XML content to the stanza.
Arguments:
- value -- An XML object, or a stanza object.
+ value -- Either an XML or a stanza object, or a list
+ of XML or stanza objects.
"""
- self.xml.append(value)
+ if not isinstance(value, list):
+ value = [value]
+ for val in value:
+ self.append(val)
return self
def delPayload(self):