summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0004/stanza
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2011-08-18 00:35:37 -0700
committerNathan Fritz <fritzy@netflint.net>2011-08-18 00:35:37 -0700
commit4ea22ff69bac4b619b1eeb918c67a209f6e953ee (patch)
treecc4a245ea03429d59b192cb3f79b3bee95343ba8 /sleekxmpp/plugins/xep_0004/stanza
parent3853898ab36fa1a74b5d9d5ea3070c3e8e1bc0f2 (diff)
parent7d8aa4157bc7a602243996a45268b172629a6ae3 (diff)
downloadslixmpp-4ea22ff69bac4b619b1eeb918c67a209f6e953ee.tar.gz
slixmpp-4ea22ff69bac4b619b1eeb918c67a209f6e953ee.tar.bz2
slixmpp-4ea22ff69bac4b619b1eeb918c67a209f6e953ee.tar.xz
slixmpp-4ea22ff69bac4b619b1eeb918c67a209f6e953ee.zip
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp/plugins/xep_0004/stanza')
-rw-r--r--sleekxmpp/plugins/xep_0004/stanza/field.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0004/stanza/field.py b/sleekxmpp/plugins/xep_0004/stanza/field.py
index 43293bfd..8131233c 100644
--- a/sleekxmpp/plugins/xep_0004/stanza/field.py
+++ b/sleekxmpp/plugins/xep_0004/stanza/field.py
@@ -85,7 +85,7 @@ class FormField(ElementBase):
return None
elif self._type == 'boolean':
return valsXML[0].text in self.true_values
- elif self._type in self.multi_value_types:
+ elif self._type in self.multi_value_types or len(valsXML) > 1:
values = []
for valXML in valsXML:
if valXML.text is None:
@@ -95,6 +95,8 @@ class FormField(ElementBase):
values = "\n".join(values)
return values
else:
+ if valsXML[0].text is None:
+ return ''
return valsXML[0].text
def set_answer(self, answer):