diff options
author | drebs <drebs@riseup.net> | 2016-09-27 20:44:53 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2016-09-30 13:10:14 -0300 |
commit | 9c4bf6adf42f0f9553ae11f24ffeb6f7cf39f374 (patch) | |
tree | c03b13ae17c0e6267ba8f3ba47c470aed7ad24d4 /src/leap/bitmask/mail/imap/service | |
parent | 10f35cacf50148c34b11fba719fc8f734f99def1 (diff) |
[refactor] turn mail services into twisted services
Diffstat (limited to 'src/leap/bitmask/mail/imap/service')
-rw-r--r-- | src/leap/bitmask/mail/imap/service/imap.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/bitmask/mail/imap/service/imap.py b/src/leap/bitmask/mail/imap/service/imap.py index aac49b6..9ccff4a 100644 --- a/src/leap/bitmask/mail/imap/service/imap.py +++ b/src/leap/bitmask/mail/imap/service/imap.py @@ -158,7 +158,7 @@ class LeapIMAPFactory(ServerFactory): return ServerFactory.doStop(self) -def run_service(soledad_sessions, port=IMAP_PORT): +def run_service(soledad_sessions, port=IMAP_PORT, factory=None): """ Main entry point to run the service from the client. @@ -169,7 +169,8 @@ def run_service(soledad_sessions, port=IMAP_PORT): the factory for the protocol. :rtype: tuple """ - factory = LeapIMAPFactory(soledad_sessions) + if not factory: + factory = LeapIMAPFactory(soledad_sessions) try: interface = "localhost" |