diff options
Diffstat (limited to 'sleekxmpp/roster')
-rw-r--r-- | sleekxmpp/roster/__init__.py | 1 | ||||
-rw-r--r-- | sleekxmpp/roster/single.py | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/roster/__init__.py b/sleekxmpp/roster/__init__.py index 4335d367..18b380c9 100644 --- a/sleekxmpp/roster/__init__.py +++ b/sleekxmpp/roster/__init__.py @@ -6,7 +6,6 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.xmlstream import JID from sleekxmpp.roster.item import RosterItem from sleekxmpp.roster.single import RosterNode from sleekxmpp.roster.multi import Roster diff --git a/sleekxmpp/roster/single.py b/sleekxmpp/roster/single.py index f080ae8a..e9ce4f21 100644 --- a/sleekxmpp/roster/single.py +++ b/sleekxmpp/roster/single.py @@ -237,8 +237,7 @@ class RosterNode(object): if not self.xmpp.is_component: return self.update(jid, subscription='remove') - def update(self, jid, name=None, subscription=None, groups=[], - block=True, timeout=None, callback=None): + def update(self, jid, name=None, subscription=None, groups=None, block=True, timeout=None, callback=None): """ Update a JID's subscription information. @@ -258,6 +257,9 @@ class RosterNode(object): Will be executed when the roster is received. Implies block=False. """ + if not groups: + groups = [] + self[jid]['name'] = name self[jid]['groups'] = groups self[jid].save() |