diff options
author | Lance Stout <lancestout@gmail.com> | 2014-08-17 17:20:26 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2014-08-17 17:20:26 -0700 |
commit | ca306e7cecee4bf7afd9ce44f5f067b305928682 (patch) | |
tree | 3641ff7754a221a53d6b5af08ffefa3f6898627d /sleekxmpp/roster | |
parent | a5c03b763a6545a214f4f391f7c07582c22150b2 (diff) | |
parent | 1bf34f7fe694c2997710e0d23b0784e824df5e5e (diff) | |
download | slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.tar.gz slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.tar.bz2 slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.tar.xz slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.zip |
Merge pull request #310 from Mayflower/cleanup
Cleanup
Diffstat (limited to 'sleekxmpp/roster')
-rw-r--r-- | sleekxmpp/roster/single.py | 6 |
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() |