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