diff options
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/bonafide/config.py | 8 | ||||
-rw-r--r-- | src/leap/bitmask/core/__init__.py | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/leap/bitmask/bonafide/config.py b/src/leap/bitmask/bonafide/config.py index 441f6a4..28210fb 100644 --- a/src/leap/bitmask/bonafide/config.py +++ b/src/leap/bitmask/bonafide/config.py @@ -20,6 +20,7 @@ Configuration for a LEAP provider. import datetime import json import os +import platform import shutil import sys @@ -43,7 +44,10 @@ logger = Logger() APPNAME = "bonafide" -ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME +if platform.system() == 'Windows': + ENDPOINT = "tcp://127.0.0.1:5001" +else: + ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME def get_path_prefix(standalone=False): @@ -133,6 +137,8 @@ def get_username_and_provider(full_id): def list_providers(): path = os.path.join(_preffix, "leap", "providers") path = os.path.expanduser(path) + if not os.path.isdir(path): + os.makedirs(path) return os.listdir(path) diff --git a/src/leap/bitmask/core/__init__.py b/src/leap/bitmask/core/__init__.py index aad3a4a..55672e4 100644 --- a/src/leap/bitmask/core/__init__.py +++ b/src/leap/bitmask/core/__init__.py @@ -1,5 +1,10 @@ +import platform + APPNAME = "bitmask.core" -ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME +if platform.system() =='Windows': + ENDPOINT = "tcp://127.0.0.1:5001" +else: + ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME # FIXME some temporary imports to make the modules # appear in the coverage report. Remove the imports when |