summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-01-31 23:13:45 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2017-02-23 00:37:28 +0100
commit8fb76310e14a5893397894c6155ac7aa4f28e483 (patch)
tree00739dd457c0681b33e0fa77729e62476a7f59dd /src/leap/bitmask
parent49fa0dd3d6c51d79096be1ac2ec3d897e607b399 (diff)
[refactor] remove unneeded function
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/vpn/launchers/darwin.py2
-rw-r--r--src/leap/bitmask/vpn/launchers/linux.py4
-rw-r--r--src/leap/bitmask/vpn/service.py2
-rw-r--r--src/leap/bitmask/vpn/utils.py23
4 files changed, 4 insertions, 27 deletions
diff --git a/src/leap/bitmask/vpn/launchers/darwin.py b/src/leap/bitmask/vpn/launchers/darwin.py
index f19404c..f637ae1 100644
--- a/src/leap/bitmask/vpn/launchers/darwin.py
+++ b/src/leap/bitmask/vpn/launchers/darwin.py
@@ -26,7 +26,7 @@ from twisted.logger import Logger
from leap.bitmask.vpn.launcher import VPNLauncher
from leap.bitmask.vpn.launcher import VPNLauncherException
-from leap.bitmask.vpn.utils import get_path_prefix
+from leap.common.config import get_path_prefix
logger = Logger()
diff --git a/src/leap/bitmask/vpn/launchers/linux.py b/src/leap/bitmask/vpn/launchers/linux.py
index a86dcb4..d39b3b1 100644
--- a/src/leap/bitmask/vpn/launchers/linux.py
+++ b/src/leap/bitmask/vpn/launchers/linux.py
@@ -25,13 +25,13 @@ import sys
from twisted.logger import Logger
-from leap.bitmask.vpn.utils import first
-from leap.bitmask.vpn.utils import get_path_prefix, force_eval
+from leap.bitmask.vpn.utils import first, force_eval
from leap.bitmask.vpn.privilege import LinuxPolicyChecker
from leap.bitmask.vpn.privilege import NoPkexecAvailable
from leap.bitmask.vpn.privilege import NoPolkitAuthAgentAvailable
from leap.bitmask.vpn.launcher import VPNLauncher
from leap.bitmask.vpn.launcher import VPNLauncherException
+from leap.common.config import get_path_prefix
logger = Logger()
COM = commands
diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py
index 965d68d..d83a9ef 100644
--- a/src/leap/bitmask/vpn/service.py
+++ b/src/leap/bitmask/vpn/service.py
@@ -27,7 +27,7 @@ from twisted.python import log
from leap.bitmask.hooks import HookableService
from leap.bitmask.vpn import EIPManager
-from leap.bitmask.vpn.utils import get_path_prefix
+from leap.common.config import get_path_prefix
class EIPService(HookableService):
diff --git a/src/leap/bitmask/vpn/utils.py b/src/leap/bitmask/vpn/utils.py
index 51f24d9..b0ffa12 100644
--- a/src/leap/bitmask/vpn/utils.py
+++ b/src/leap/bitmask/vpn/utils.py
@@ -21,29 +21,6 @@ Common utils
import os
-
-def get_path_prefix(standalone=False):
- """
- Returns the platform dependent path prefix.
-
- :param standalone: if True it will return the prefix for a standalone
- application.
- Otherwise, it will return the system default for
- configuration storage.
- :type standalone: bool
- """
- return os.path.expanduser("~/.config") # hardcoded Linux XDG config path
-
- # TODO: this is to use XDG specifications
- # commented temporarily to avoid that extra dependency
-
- # config_home = get_xdg_config_home()
- # if standalone:
- # config_home = os.path.join(os.getcwd(), "config")
- #
- # return config_home
-
-
def force_eval(items):
"""
Return a sequence that evaluates any callable in the sequence,