diff options
author | Lance Stout <lancestout@gmail.com> | 2012-09-01 13:56:48 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-09-01 13:56:48 -0700 |
commit | 357406d801dabcac70d2794ac4c61c70655e704b (patch) | |
tree | 90a2e60c559f25abdf24605d9d0e60a8bb12f688 /sleekxmpp | |
parent | c7ec6a72cda41c7dbbdd4193d795b5dd8df4843f (diff) | |
download | slixmpp-357406d801dabcac70d2794ac4c61c70655e704b.tar.gz slixmpp-357406d801dabcac70d2794ac4c61c70655e704b.tar.bz2 slixmpp-357406d801dabcac70d2794ac4c61c70655e704b.tar.xz slixmpp-357406d801dabcac70d2794ac4c61c70655e704b.zip |
Map <group /> elements with no content to '' instead of None.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/stanza/roster.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): |