summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0004
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-16 22:02:21 -0700
committerLance Stout <lancestout@gmail.com>2012-03-16 22:02:21 -0700
commita6f3d740a29832692c082f59e5c2d63d7430d58b (patch)
treee30bceb48aa6caa3d9ef4e3515d1cdf3d2970a76 /sleekxmpp/plugins/xep_0004
parent19a6f61b44dad8bde66b8b781f01c2cb860a94f0 (diff)
downloadslixmpp-a6f3d740a29832692c082f59e5c2d63d7430d58b.tar.gz
slixmpp-a6f3d740a29832692c082f59e5c2d63d7430d58b.tar.bz2
slixmpp-a6f3d740a29832692c082f59e5c2d63d7430d58b.tar.xz
slixmpp-a6f3d740a29832692c082f59e5c2d63d7430d58b.zip
Fix error when assigning form values that include booleans.
Diffstat (limited to 'sleekxmpp/plugins/xep_0004')
-rw-r--r--sleekxmpp/plugins/xep_0004/stanza/field.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0004/stanza/field.py b/sleekxmpp/plugins/xep_0004/stanza/field.py
index 8156997c..1e175966 100644
--- a/sleekxmpp/plugins/xep_0004/stanza/field.py
+++ b/sleekxmpp/plugins/xep_0004/stanza/field.py
@@ -138,6 +138,8 @@ class FormField(ElementBase):
valXML.text = '0'
self.xml.append(valXML)
elif self._type in self.multi_value_types or self._type in ('', None):
+ if isinstance(value, bool):
+ value = [value]
if not isinstance(value, list):
value = value.replace('\r', '')
value = value.split('\n')