summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-02-23 00:10:29 +0100
committerKali Kaneko <kali@leap.se>2018-02-23 16:37:34 +0100
commitd7b00e6392112c8ceb01fb9ecae8866cfe166a71 (patch)
tree3df12b543f3bf804380e219670344655d03b108c /src/leap
parentfb64aef0566c8122f0a1444d0a86686e92ea94e3 (diff)
[feat] put the socket in the snap folder if defined
On snap is better if we don't put stuff in /tmp but in $SNAP
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/core/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/__init__.py b/src/leap/bitmask/core/__init__.py
index 644441f6..9b11007c 100644
--- a/src/leap/bitmask/core/__init__.py
+++ b/src/leap/bitmask/core/__init__.py
@@ -1,4 +1,5 @@
import platform
+import os
# FIXME some temporary imports to make the modules
# appear in the coverage report. Remove the imports when
@@ -18,6 +19,8 @@ def dummy_imports():
APPNAME = "bitmask.core"
if platform.system() == 'Windows':
ENDPOINT = "tcp://127.0.0.1:5001"
+elif os.getenv('SNAP'):
+ ENDPOINT = "ipc://%s/%s.sock" % (os.getenv('SNAP'), APPNAME)
else:
ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME