From cfd645a7f8478ba958aea5a56a04721e3df5aede Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 10 Jun 2015 10:49:34 -0400 Subject: [refactor] remove unneeded conditional --- mail/src/leap/mail/sync_hooks.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mail/src') diff --git a/mail/src/leap/mail/sync_hooks.py b/mail/src/leap/mail/sync_hooks.py index 3cf858b5..a8a69c95 100644 --- a/mail/src/leap/mail/sync_hooks.py +++ b/mail/src/leap/mail/sync_hooks.py @@ -60,8 +60,7 @@ class MailProcessingPostSyncHook(object): log.msg("Mail post-sync hook: processing %s" % doc_id) process_fun(doc_id) - if self._processing_deferreds: - return defer.gatherResults(self._processing_deferreds) + return defer.gatherResults(self._processing_deferreds) def set_account(self, account): self._account = account @@ -100,9 +99,8 @@ class MailProcessingPostSyncHook(object): return res d = self.process_received_docs(pending) - if d: - d.addCallback(remove_pending_docs) - return d + d.addCallback(remove_pending_docs) + return d _mbox_uuid_regex = regex_compile(constants.METAMSGID_MBOX_RE) -- cgit v1.2.3