summaryrefslogtreecommitdiff
path: root/src/roster.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/roster.py')
-rw-r--r--src/roster.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/roster.py b/src/roster.py
index 3458d5b5..0c91b3fe 100644
--- a/src/roster.py
+++ b/src/roster.py
@@ -95,7 +95,15 @@ class Roster(object):
def get_groups(self, sort=''):
"""Return a list of the RosterGroups"""
- group_list = sorted(filter(lambda x: bool(x), self.groups.values()), key=lambda x: x.name.lower())
+ group_list = sorted(
+ filter(
+ lambda x: bool(x),
+ self.groups.values()
+ ),
+ key=lambda x: x.name.lower() if x.name else ''
+ )
+
+ log.debug("Current groups: %s", group_list)
for sorting in sort.split(':'):
if sorting == 'reverse':