prevent traceback when we remove contacts in iter_contacts() loop.

This commit is contained in:
Yann Leboulanger 2009-07-20 23:47:59 +02:00
parent 6eba5f9946
commit e40a3b6272
1 changed files with 2 additions and 2 deletions

View File

@ -291,8 +291,8 @@ class Contacts:
def iter_contacts(self, account): def iter_contacts(self, account):
if account in self._contacts: if account in self._contacts:
for jid in self._contacts[account]: for jid in self._contacts[account].keys():
for contact in self._contacts[account][jid]: for contact in self._contacts[account][jid].keys():
yield contact yield contact
def get_contact_from_full_jid(self, account, fjid): def get_contact_from_full_jid(self, account, fjid):