comparison src/browser/sat_browser/contact.py @ 518:3d8e8f693576

browser_side: avoid some confusions between jid object 1. as an instance of JID or 2. as a str
author souliane <souliane@mailoo.org>
date Tue, 02 Sep 2014 21:13:59 +0200
parents db3436c85fb1
children ee9c7bd266ad
comparison
equal deleted inserted replaced
517:85699d18921f 518:3d8e8f693576
201 """Add a contact to the list. 201 """Add a contact to the list.
202 202
203 @param jid (str): JID of the contact 203 @param jid (str): JID of the contact
204 @param name (str): optional name of the contact 204 @param name (str): optional name of the contact
205 """ 205 """
206 assert(isinstance(jid, str))
206 if jid in self.contacts: 207 if jid in self.contacts:
207 return 208 return
208 index = 0 209 index = 0
209 for contact_ in self.contacts: 210 for contact_ in self.contacts:
210 if contact_ > jid: 211 if contact_ > jid: