Primitivus: begining of management for actionResult

This commit is contained in:
Goffi 2010-07-31 00:34:05 +08:00
commit 49a5f2de2c

View file

@ -124,11 +124,12 @@ class ContactList(urwid.WidgetWrap, QuickContactList):
def clear_contacts(self):
"""clear all the contact list"""
self.groups={}
self.selected = None
def replace(self, jid, groups=[None]):
"""add a contact to the list if doesn't exist, else update it"""
assert groups.__class__ == list
assert jid.__class__ == JID
assert isinstance(groups, list)
assert isinstance(jid, JID)
if not groups:
groups=[None]
for group in groups: