From 357406d801dabcac70d2794ac4c61c70655e704b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 1 Sep 2012 13:56:48 -0700 Subject: Map elements with no content to '' instead of None. --- sleekxmpp/stanza/roster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/stanza/roster.py b/sleekxmpp/stanza/roster.py index a415c482..681efd4f 100644 --- a/sleekxmpp/stanza/roster.py +++ b/sleekxmpp/stanza/roster.py @@ -130,7 +130,10 @@ class RosterItem(ElementBase): def get_groups(self): groups = [] for group in self.xml.findall('{%s}group' % self.namespace): - groups.append(group.text) + if group.text: + groups.append(group.text) + else: + groups.append('') return groups def set_groups(self, values): -- cgit v1.2.3