summaryrefslogtreecommitdiff
path: root/src/leap/mail/mail.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-06-25 09:42:25 -0400
committerKali Kaneko <kali@leap.se>2015-06-25 11:56:53 -0400
commit9db1529e60cadff872cd3066e837e15413216b71 (patch)
treeb341965786a7d2feb0bc2f363f07e72e18664b72 /src/leap/mail/mail.py
parentc8dfed5b5f4ccb87003119f14e189566219365bb (diff)
[bug] saving message to drafts folder hangs
the bug consist on a fetch-while-pending-inserts hanging. the pending insert dict was not being cleaned up because the lookup for the Message-Id *is* case-sensitive (in the headers dict). by using a temporary all-keys-lowercase dict the lookup can be performed right, and the fetch returns successfully. at this point there's still a pending bug with Drafts, and it is that the new version is inserted but the MUA (TB) doesn't hide the older version (although a Delete flag is added). Resolves: #7189, #7190 Releases: 0.4.0
Diffstat (limited to 'src/leap/mail/mail.py')
-rw-r--r--src/leap/mail/mail.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/leap/mail/mail.py b/src/leap/mail/mail.py
index bf5b34d..b4602b3 100644
--- a/src/leap/mail/mail.py
+++ b/src/leap/mail/mail.py
@@ -622,6 +622,12 @@ class MessageCollection(object):
d = self.mbox_indexer.create_table(self.mbox_uuid)
d.addBoth(lambda _: self.mbox_indexer.insert_doc(
self.mbox_uuid, doc_id))
+ # XXX---------------------------------
+ def print_inserted(r):
+ print "INSERTED", r
+ return r
+ d.addCallback(print_inserted)
+ # XXX---------------------------------
return d
d = wrapper.create(
@@ -629,8 +635,9 @@ class MessageCollection(object):
notify_just_mdoc=notify_just_mdoc,
pending_inserts_dict=self._pending_inserts)
d.addCallback(insert_mdoc_id, wrapper)
- d.addErrback(lambda f: f.printTraceback())
- d.addCallback(self.cb_signal_unread_to_ui)
+ d.addErrback(lambda failure: log.err(failure))
+ #d.addCallback(self.cb_signal_unread_to_ui)
+
return d
def cb_signal_unread_to_ui(self, result):