diff options
author | Robin Gloster <robin@loc-com.de> | 2014-08-18 00:52:24 +0200 |
---|---|---|
committer | Robin Gloster <robin@loc-com.de> | 2014-08-18 00:55:10 +0200 |
commit | 4144d60017e200d97bcfe0286daee06d4641a9e0 (patch) | |
tree | fb9c0349f91d289b05107e7dad07c78f5be2c691 /sleekxmpp/roster | |
parent | a5c03b763a6545a214f4f391f7c07582c22150b2 (diff) | |
download | slixmpp-4144d60017e200d97bcfe0286daee06d4641a9e0.tar.gz slixmpp-4144d60017e200d97bcfe0286daee06d4641a9e0.tar.bz2 slixmpp-4144d60017e200d97bcfe0286daee06d4641a9e0.tar.xz slixmpp-4144d60017e200d97bcfe0286daee06d4641a9e0.zip |
cleanup semicolons, whitespace and mutable default arguments
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() |