diff options
author | mathieui <mathieui@mathieui.net> | 2012-04-27 23:42:22 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-04-27 23:42:22 +0200 |
commit | 24341c84290b5e9636223fb9679efd6a7b52c5e2 (patch) | |
tree | 3e516358f7e12240cbd24b535c5721f32a1979b7 /src/windows.py | |
parent | de63a1affdb57f521ab2e7a3e89182c79c1ebe2f (diff) | |
download | poezio-24341c84290b5e9636223fb9679efd6a7b52c5e2.tar.gz poezio-24341c84290b5e9636223fb9679efd6a7b52c5e2.tar.bz2 poezio-24341c84290b5e9636223fb9679efd6a7b52c5e2.tar.xz poezio-24341c84290b5e9636223fb9679efd6a7b52c5e2.zip |
Prevent some iteration problems
Diffstat (limited to 'src/windows.py')
-rw-r--r-- | src/windows.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/windows.py b/src/windows.py index b0780cf5..c929de9d 100644 --- a/src/windows.py +++ b/src/windows.py @@ -1543,7 +1543,7 @@ class RosterWin(Win): self.draw_roster_information(roster) y = 1 show_offline = config.get('roster_show_offline', 'false') == 'true' - for group in roster.get_groups(): + for group in roster.get_groups()[:]: contacts_filtered = group.get_contacts(roster.contact_filter) if (not show_offline and group.get_nb_connected_contacts() == 0) or not contacts_filtered: continue # Ignore empty groups @@ -1555,7 +1555,7 @@ class RosterWin(Win): y += 1 if group.folded: continue - for contact in group.get_contacts(roster.contact_filter): + for contact in group.get_contacts(roster.contact_filter)[:]: if not show_offline and len(contact) == 0: continue if y-1 == self.pos: |