From 6f7a23aed1b813aef17504ae7f729453ac24b95e Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 9 Jun 2015 11:32:41 -0400 Subject: [bug] pass the doclist to the ui signal before, we were taking the length of a string, signalling an incorrect number to the ui. currently this event is not being used, just only logged. in the future the ui could probably might want to make use of this info to keep record of a separate counter (how many mails received in the last sync). --- mail/src/leap/mail/incoming/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mail/src') diff --git a/mail/src/leap/mail/incoming/service.py b/mail/src/leap/mail/incoming/service.py index 4738dd4..3daf86b 100644 --- a/mail/src/leap/mail/incoming/service.py +++ b/mail/src/leap/mail/incoming/service.py @@ -239,8 +239,6 @@ class IncomingMail(Service): :returns: doclist :rtype: iterable """ - # FIXME WTF len(doclist) is 69? - doclist = first(doclist) # gatherResults pass us a list if doclist: fetched_ts = time.mktime(time.gmtime()) num_mails = len(doclist) if doclist is not None else 0 @@ -299,7 +297,9 @@ class IncomingMail(Service): d.addCallback(self._extract_keys) d.addCallbacks(self._add_message_locally, self._errback) deferreds.append(d) - return defer.gatherResults(deferreds, consumeErrors=True) + d = defer.gatherResults(deferreds, consumeErrors=True) + d.addCallback(lambda _: doclist) + return d # # operations on individual messages -- cgit v1.2.3