Author: jim++ Date: 2008-06-01 23:13:06 +0200 (Sun, 01 Jun 2008) New Revision: 9731
Modified: trunk/src/common/contacts.py Log: Don't traceback when refiltering during the model.clear (has a bad account name). Fixes #3893.
Modified: trunk/src/common/contacts.py =================================================================== --- trunk/src/common/contacts.py 2008-06-01 08:44:03 UTC (rev 9730) +++ trunk/src/common/contacts.py 2008-06-01 21:13:06 UTC (rev 9731) @@ -246,9 +246,10 @@ return None
def iter_contacts(self, account): - for jid in self._contacts[account]: - for contact in self._contacts[account][jid]: - yield contact + if account in self._contacts: + for jid in self._contacts[account]: + for contact in self._contacts[account][jid]: + yield contact
def get_contact_from_full_jid(self, account, fjid): ''' Get Contact object for specific resource of given jid'''