From fa6ab2631f86cb323d6adeb09d855ef861a79c2b Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 4 Apr 2018 01:51:00 +0200 Subject: [bug] fix import --- src/leap/bitmask/util.py | 3 +++ src/leap/bitmask/vpn/fw/firewall.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/leap/bitmask/util.py b/src/leap/bitmask/util.py index bd3d7442..76bc3a24 100644 --- a/src/leap/bitmask/util.py +++ b/src/leap/bitmask/util.py @@ -26,6 +26,7 @@ from twisted.logger import Logger from leap.common.files import which +# TODO move to bitmask.system? STANDALONE = getattr(sys, 'frozen', False) log = Logger() @@ -45,6 +46,7 @@ def here(module=None): return dirname(__file__) +# TODO move to service? def merge_status(children): def key(service): @@ -72,6 +74,7 @@ def merge_status(children): return res +# TODO move to mail def get_gpg_bin_path(): """ Return the path to gpg binary. diff --git a/src/leap/bitmask/vpn/fw/firewall.py b/src/leap/bitmask/vpn/fw/firewall.py index 2a0300cf..1142b264 100644 --- a/src/leap/bitmask/vpn/fw/firewall.py +++ b/src/leap/bitmask/vpn/fw/firewall.py @@ -25,6 +25,7 @@ import subprocess from twisted.logger import Logger +from leap.bitmask.util import STANDALONE from leap.bitmask.system import IS_MAC, IS_LINUX, IS_SNAP from leap.bitmask.vpn.constants import BITMASK_ROOT_SYSTEM from leap.bitmask.vpn.constants import BITMASK_ROOT_LOCAL @@ -96,7 +97,7 @@ class _LinuxFirewallManager(object): if IS_SNAP: # snap has its own version under /snap BITMASK_ROOT = BITMASK_ROOT_SNAP - elif IS_STANDALONE and os.path.isfile(BITMASK_ROOT_LOCAL): + elif STANDALONE and os.path.isfile(BITMASK_ROOT_LOCAL): # if this is a bundle, we pick local. bundles ask to install it there. BITMASK_ROOT = BITMASK_ROOT_LOCAL else: -- cgit v1.2.3