From d5d9c3794566b999bfd42398072c9f7e3177d1b9 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Mon, 11 May 2015 18:04:29 -0300 Subject: [feat] adapt to new events api on common - Related: #6359 --- src/leap/mail/imap/service/imap.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/leap/mail/imap/service') 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)) -- cgit v1.2.3