From a6f3d740a29832692c082f59e5c2d63d7430d58b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 16 Mar 2012 22:02:21 -0700 Subject: [PATCH] Fix error when assigning form values that include booleans. --- sleekxmpp/plugins/xep_0004/stanza/field.py | 2 ++ 1 file changed, 2 insertions(+) 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')