summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/cli/cmd_list_deleted_mailboxes.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pykolab/cli/cmd_list_deleted_mailboxes.py b/pykolab/cli/cmd_list_deleted_mailboxes.py
index d39f890..637b491 100644
--- a/pykolab/cli/cmd_list_deleted_mailboxes.py
+++ b/pykolab/cli/cmd_list_deleted_mailboxes.py
@@ -62,10 +62,8 @@ def execute(*args, **kw):
domains = auth.list_domains()
folders = []
- for primary,secondaries in domains:
- folders.extend(imap.lm("DELETED/*@%s" % (primary)))
- for secondary in secondaries:
- folders.extend(imap.lm("DELETED/*@%s" % (secondary)))
+ for domain in list(set(domains.keys())):
+ folders.extend(imap.lm("DELETED/*@%s" % (domain)))
folders.extend(imap.lm("DELETED/*"))