summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/mail/imap/service
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2016-09-27 20:44:53 -0300
committerdrebs <drebs@riseup.net>2016-09-30 13:10:14 -0300
commit9c4bf6adf42f0f9553ae11f24ffeb6f7cf39f374 (patch)
treec03b13ae17c0e6267ba8f3ba47c470aed7ad24d4 /src/leap/bitmask/mail/imap/service
parent10f35cacf50148c34b11fba719fc8f734f99def1 (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.py5
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"