summaryrefslogtreecommitdiff
path: root/sleekxmpp/roster/single.py
diff options
context:
space:
mode:
authorRobin Gloster <robin@loc-com.de>2014-08-18 00:52:24 +0200
committerRobin Gloster <robin@loc-com.de>2014-08-23 12:47:29 +0200
commitafc939708ff71e168f9204f1eab8823b7dc9f875 (patch)
tree255d2c159d1b0b31ae7b1322d802a9fb4770f23b /sleekxmpp/roster/single.py
parentaabec8b993748866b9cf3f09ebb7ae7ce2ddc426 (diff)
downloadslixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.tar.gz
slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.tar.bz2
slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.tar.xz
slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.zip
cleanup semicolons, whitespace and mutable default arguments
Diffstat (limited to 'sleekxmpp/roster/single.py')
-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()