summaryrefslogtreecommitdiff
path: root/sleekxmpp/roster
diff options
context:
space:
mode:
authorMike Taylor <bear42@gmail.com>2015-04-11 20:12:19 -0400
committerMike Taylor <bear42@gmail.com>2015-04-11 20:12:19 -0400
commit86e85f98357b40941fddb7a2dbf8fbe16f96032e (patch)
tree65a86c0378c5e59f1822dfba8ed484f77ff5ebeb /sleekxmpp/roster
parentcc145d20b077442b7d4118d4d2f4c27e1b0faf0c (diff)
parent073e85381a86069e931369bb5353cab2a2e3682d (diff)
downloadslixmpp-86e85f98357b40941fddb7a2dbf8fbe16f96032e.tar.gz
slixmpp-86e85f98357b40941fddb7a2dbf8fbe16f96032e.tar.bz2
slixmpp-86e85f98357b40941fddb7a2dbf8fbe16f96032e.tar.xz
slixmpp-86e85f98357b40941fddb7a2dbf8fbe16f96032e.zip
Merge pull request #313 from mayflower/develop
Proposing #310 again in fixed version
Diffstat (limited to 'sleekxmpp/roster')
-rw-r--r--sleekxmpp/roster/single.py6
1 files changed, 4 insertions, 2 deletions
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()