summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/roster.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/stanza/roster.py')
-rw-r--r--sleekxmpp/stanza/roster.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/stanza/roster.py b/sleekxmpp/stanza/roster.py
index 1fefc180..69027b6c 100644
--- a/sleekxmpp/stanza/roster.py
+++ b/sleekxmpp/stanza/roster.py
@@ -23,7 +23,9 @@ class Roster(ElementBase):
if 'subscription' in items[jid]:
item.attrib['subscription'] = items[jid]['subscription']
if 'name' in items[jid]:
- item.attrib['name'] = items[jid]['name']
+ name = items[jid]['name']
+ if name is not None:
+ item.attrib['name'] = name
if 'groups' in items[jid]:
for group in items[jid]['groups']:
groupxml = ET.Element('{jabber:iq:roster}group')