Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_contact_list.py @ 587:952322b1d490
Remove trailing whitespaces.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 18 Jan 2013 17:55:34 +0100 |
parents | ca13633d3b6b |
children | beaf6bec2fcd |
comparison
equal
deleted
inserted
replaced
586:6a718ede8be1 | 587:952322b1d490 |
---|---|
47 jid_cache = self._cache.setdefault(jid.short, {}) | 47 jid_cache = self._cache.setdefault(jid.short, {}) |
48 jid_cache[name] = value | 48 jid_cache[name] = value |
49 | 49 |
50 def __contains__(self, jid): | 50 def __contains__(self, jid): |
51 raise NotImplementedError | 51 raise NotImplementedError |
52 | 52 |
53 def clearContacts(self): | 53 def clearContacts(self): |
54 """Clear all the contact list""" | 54 """Clear all the contact list""" |
55 self.specials.clear() | 55 self.specials.clear() |
56 | 56 |
57 def replace(self, jid, groups=None, attributes=None): | 57 def replace(self, jid, groups=None, attributes=None): |
58 """add a contact to the list if doesn't exist, else update it""" | 58 """add a contact to the list if doesn't exist, else update it""" |
59 if attributes and 'name' in attributes: | 59 if attributes and 'name' in attributes: |
60 self.setCache(jid, 'name', attributes['name']) | 60 self.setCache(jid, 'name', attributes['name']) |
61 | 61 |
62 def remove(self, jid): | 62 def remove(self, jid): |
63 """remove a contact from the list""" | 63 """remove a contact from the list""" |
64 try: | 64 try: |
65 del self.specials[jid.short] | 65 del self.specials[jid.short] |
66 except KeyError: | 66 except KeyError: |