Skip to content
Snippets Groups Projects

[feat] put the socket in the snap folder if defined

Closed meskio requested to merge meskio/bitmask-dev:feat/snap_path into master
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
import platform
import platform
 
import os
# FIXME some temporary imports to make the modules
# FIXME some temporary imports to make the modules
# appear in the coverage report. Remove the imports when
# appear in the coverage report. Remove the imports when
@@ -18,6 +19,8 @@ def dummy_imports():
@@ -18,6 +19,8 @@ def dummy_imports():
APPNAME = "bitmask.core"
APPNAME = "bitmask.core"
if platform.system() == 'Windows':
if platform.system() == 'Windows':
ENDPOINT = "tcp://127.0.0.1:5001"
ENDPOINT = "tcp://127.0.0.1:5001"
 
elif os.getenv('SNAP'):
 
ENDPOINT = "ipc://%s/%s.sock" % (os.getenv('SNAP'), APPNAME)
else:
else:
ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME
ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME
Loading