summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0004
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-18 12:27:53 -0700
committerLance Stout <lancestout@gmail.com>2012-10-19 00:06:45 -0700
commit63b58edda11e34b02123ff0e9944c3c2c3bc17ba (patch)
tree895117f132c4fa30f1dd83a37778b9099ff1de79 /sleekxmpp/plugins/xep_0004
parentaf9632519c93110ce04823665404d3c70baabab2 (diff)
downloadslixmpp-63b58edda11e34b02123ff0e9944c3c2c3bc17ba.tar.gz
slixmpp-63b58edda11e34b02123ff0e9944c3c2c3bc17ba.tar.bz2
slixmpp-63b58edda11e34b02123ff0e9944c3c2c3bc17ba.tar.xz
slixmpp-63b58edda11e34b02123ff0e9944c3c2c3bc17ba.zip
Allow passing form instructions as a list of strings.
Diffstat (limited to 'sleekxmpp/plugins/xep_0004')
-rw-r--r--sleekxmpp/plugins/xep_0004/stanza/form.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0004/stanza/form.py b/sleekxmpp/plugins/xep_0004/stanza/form.py
index bbf0ee7d..721ecc35 100644
--- a/sleekxmpp/plugins/xep_0004/stanza/form.py
+++ b/sleekxmpp/plugins/xep_0004/stanza/form.py
@@ -201,7 +201,8 @@ class Form(ElementBase):
del self['instructions']
if instructions in [None, '']:
return
- instructions = instructions.split('\n')
+ if not isinstance(instructions, list):
+ instructions = instructions.split('\n')
for instruction in instructions:
inst = ET.Element('{%s}instructions' % self.namespace)
inst.text = instruction