diff options
author | Kali Kaneko <kali@leap.se> | 2014-02-02 16:26:58 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-02-02 18:09:06 -0400 |
commit | 8201146254a204fec92395bf497a2a6f76274b85 (patch) | |
tree | 234697b9fac5b392953db47f5d421387d94687ce /src/leap/mail/imap/mailbox.py | |
parent | 18fed49c4143eb764ae9e806882d24f8f4e95744 (diff) |
re-add expunge deferred
Diffstat (limited to 'src/leap/mail/imap/mailbox.py')
-rw-r--r-- | src/leap/mail/imap/mailbox.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py index 688f941..40d3420 100644 --- a/src/leap/mail/imap/mailbox.py +++ b/src/leap/mail/imap/mailbox.py @@ -486,8 +486,8 @@ class SoledadMailbox(WithMsgFields, MBoxParser): Expunge and mark as closed """ d = self.expunge() - #d.addCallback(self._close_cb) - #return d + d.addCallback(self._close_cb) + return d def _expunge_cb(self, result): return result @@ -498,15 +498,11 @@ class SoledadMailbox(WithMsgFields, MBoxParser): """ if not self.isWriteable(): raise imap4.ReadOnlyMailbox - - return self._memstore.expunge(self.mbox) - - # TODO we can defer this back when it's correct - # but we should make sure the memstore has been synced. - - #d = self._memstore.expunge(self.mbox) - #d.addCallback(self._expunge_cb) - #return d + d = defer.Deferred() + return self._memstore.expunge(self.mbox, d) + self._memstore.expunge(self.mbox) + d.addCallback(self._expunge_cb, d) + return d def _bound_seq(self, messages_asked): """ @@ -800,7 +796,7 @@ class SoledadMailbox(WithMsgFields, MBoxParser): :rtype: Deferred """ from twisted.internet import reactor - print "COPY :", message + d = defer.Deferred() # XXX this should not happen ... track it down, # probably to FETCH... |