Map <group /> elements with no content to '' instead of None.
This commit is contained in:
parent
c7ec6a72cd
commit
357406d801
1 changed files with 4 additions and 1 deletions
|
@ -130,7 +130,10 @@ class RosterItem(ElementBase):
|
|||
def get_groups(self):
|
||||
groups = []
|
||||
for group in self.xml.findall('{%s}group' % self.namespace):
|
||||
if group.text:
|
||||
groups.append(group.text)
|
||||
else:
|
||||
groups.append('')
|
||||
return groups
|
||||
|
||||
def set_groups(self, values):
|
||||
|
|
Loading…
Reference in a new issue