diff options
author | Ruben Pollan <meskio@sindominio.net> | 2015-09-16 12:31:50 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-09-16 11:54:39 -0400 |
commit | ab51d28ab979c5fa0469d5d3e26efe99fc47d106 (patch) | |
tree | 5033eeb93975ea90226a7cfafbbeaac2d163e5d3 /mail/src | |
parent | 61c9901bebf2e55c7bb43c7aa06b17187a5eaf43 (diff) |
[style] clean up incoming/service.py
Diffstat (limited to 'mail/src')
-rw-r--r-- | mail/src/leap/mail/incoming/service.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mail/src/leap/mail/incoming/service.py b/mail/src/leap/mail/incoming/service.py index 8d8f3c2a..c98e639b 100644 --- a/mail/src/leap/mail/incoming/service.py +++ b/mail/src/leap/mail/incoming/service.py @@ -21,7 +21,6 @@ import copy import logging import shlex import time -import traceback import warnings from email.parser import Parser @@ -36,7 +35,6 @@ from twisted.python import log from twisted.internet import defer, reactor from twisted.internet.task import LoopingCall from twisted.internet.task import deferLater -from u1db import errors as u1db_errors from leap.common.events import emit_async, catalog from leap.common.check import leap_assert, leap_assert_type @@ -44,7 +42,7 @@ from leap.common.mail import get_email_charset from leap.keymanager import errors as keymanager_errors from leap.keymanager.openpgp import OpenPGPKey from leap.mail.adaptors import soledad_indexes as fields -from leap.mail.utils import json_loads, empty, first +from leap.mail.utils import json_loads, empty from leap.soledad.client import Soledad from leap.soledad.common.crypto import ENC_SCHEME_KEY, ENC_JSON_KEY from leap.soledad.common.errors import InvalidAuthTokenError @@ -248,7 +246,7 @@ class IncomingMail(Service): if num_mails != 0: log.msg("there are %s mails" % (num_mails,)) emit_async(catalog.MAIL_FETCHED_INCOMING, - str(num_mails), str(fetched_ts)) + str(num_mails), str(fetched_ts)) return doclist def _signal_unread_to_ui(self, *args): @@ -256,7 +254,7 @@ class IncomingMail(Service): Sends unread event to ui. """ emit_async(catalog.MAIL_UNREAD_MESSAGES, - str(self._inbox_collection.count_unseen())) + str(self._inbox_collection.count_unseen())) # process incoming mail. @@ -280,7 +278,7 @@ class IncomingMail(Service): for index, doc in enumerate(doclist): logger.debug("processing doc %d of %d" % (index + 1, num_mails)) emit_async(catalog.MAIL_MSG_PROCESSING, - str(index), str(num_mails)) + str(index), str(num_mails)) keys = doc.content.keys() |