summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/service/imap.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2015-05-11 18:04:29 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-05-14 12:41:48 -0300
commitd5d9c3794566b999bfd42398072c9f7e3177d1b9 (patch)
treee8035a20e5f888e53b221b5593ea484d441f4f10 /src/leap/mail/imap/service/imap.py
parent154e1aa347bb9ee0a9ed9abd60ed703a81cce017 (diff)
[feat] adapt to new events api on common
- Related: #6359
Diffstat (limited to 'src/leap/mail/imap/service/imap.py')
-rw-r--r--src/leap/mail/imap/service/imap.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py
index b3282d4..370c513 100644
--- a/src/leap/mail/imap/service/imap.py
+++ b/src/leap/mail/imap/service/imap.py
@@ -31,14 +31,12 @@ from twisted.python import log
logger = logging.getLogger(__name__)
-from leap.common import events as leap_events
+from leap.common.events import emit, catalog
from leap.common.check import leap_assert_type, leap_check
from leap.mail.imap.account import IMAPAccount
from leap.mail.imap.server import LEAPIMAPServer
from leap.soledad.client import Soledad
-from leap.common.events.events_pb2 import IMAP_SERVICE_STARTED
-from leap.common.events.events_pb2 import IMAP_SERVICE_FAILED_TO_START
DO_MANHOLE = os.environ.get("LEAP_MAIL_MANHOLE", None)
if DO_MANHOLE:
@@ -182,10 +180,10 @@ def run_service(store, **kwargs):
reactor.listenTCP(manhole.MANHOLE_PORT, manhole_factory,
interface="127.0.0.1")
logger.debug("IMAP4 Server is RUNNING in port %s" % (port,))
- leap_events.signal(IMAP_SERVICE_STARTED, str(port))
+ emit(catalog.IMAP_SERVICE_STARTED, str(port))
# FIXME -- change service signature
return tport, factory
# not ok, signal error.
- leap_events.signal(IMAP_SERVICE_FAILED_TO_START, str(port))
+ emit(catalog.IMAP_SERVICE_FAILED_TO_START, str(port))