summaryrefslogtreecommitdiff
path: root/service/pixelated/bitmask_libraries
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-01-19 13:58:11 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-01-19 13:59:05 +0100
commit93bc35da71c4eeb8e770ea266854b344e959655f (patch)
tree9d4cc21652d5fd2c049ca7255ae03edd895109e1 /service/pixelated/bitmask_libraries
parentcd205b826ca9c1a65aee5d7005ce3853f57fcf0b (diff)
Issue #169: Allow custom home folder.
- add option --home /some/path to set a custom location for all user agent files.
Diffstat (limited to 'service/pixelated/bitmask_libraries')
-rw-r--r--service/pixelated/bitmask_libraries/session.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/service/pixelated/bitmask_libraries/session.py b/service/pixelated/bitmask_libraries/session.py
index 1143eb52..158d6605 100644
--- a/service/pixelated/bitmask_libraries/session.py
+++ b/service/pixelated/bitmask_libraries/session.py
@@ -29,15 +29,16 @@ from .nicknym import NickNym
from .auth import LeapAuthenticator, LeapCredentials
from .soledad import SoledadSessionFactory, SoledadSession
from .smtp import LeapSmtp
+from .config import DEFAULT_LEAP_HOME
SESSIONS = {}
-def open(username, password, server_name):
+def open(username, password, server_name, leap_home=DEFAULT_LEAP_HOME):
certs_home = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "certificates"))
- config = LeapConfig(certs_home=certs_home)
+ config = LeapConfig(leap_home=leap_home, certs_home=certs_home)
provider = LeapProvider(server_name, config)
session = LeapSessionFactory(provider).create(LeapCredentials(username, password))