From cf702f32225e50a8f283d2fdda64c93116c12724 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 14 Jan 2015 01:09:19 -0400 Subject: patch cbSelect to accept deferreds for count* --- src/leap/mail/imap/account.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/leap/mail/imap/account.py') diff --git a/src/leap/mail/imap/account.py b/src/leap/mail/imap/account.py index dfc0d62..8a6e87e 100644 --- a/src/leap/mail/imap/account.py +++ b/src/leap/mail/imap/account.py @@ -330,8 +330,7 @@ class IMAPAccount(object): oldname = normalize_mailbox(oldname) newname = normalize_mailbox(newname) - def rename_inferiors(inferiors_result): - inferiors, mailboxes = inferiors_result + def rename_inferiors((inferiors, mailboxes)): rename_deferreds = [] inferiors = [ (o, o.replace(oldname, newname, 1)) for o in inferiors] @@ -347,7 +346,10 @@ class IMAPAccount(object): d1 = defer.gatherResults(rename_deferreds, consumeErrors=True) return d1 - d = self._inferiorNames(oldname) + d1 = self._inferiorNames(oldname) + d2 = self.account.list_all_mailbox_names() + + d = defer.gatherResults([d1, d2]) d.addCallback(rename_inferiors) return d -- cgit v1.2.3