Don't traceback when refiltering during the model.clear (has a bad account name).

Fixes #3893.
This commit is contained in:
Jean-Marie Traissard 2008-06-01 21:13:06 +00:00
parent 5a459104d5
commit 9f613afd4f
1 changed files with 4 additions and 3 deletions

View File

@ -246,9 +246,10 @@ class Contacts:
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'''