summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2017-10-11 09:10:40 -0700
committerKali Kaneko <kali@leap.se>2017-10-11 18:41:01 +0200
commit02a2406d82727cb82a4fbf0228c785d205ad5f73 (patch)
tree30aaac3c163e6f71d4104bc1d938ef89a771a15a
parent6648d03c81d2c7281c9553340835fa2880777a4c (diff)
[bug] import linux specific constants inside if block
-rw-r--r--pkg/pyinst/app.spec1
-rw-r--r--src/leap/bitmask/vpn/helpers/__init__.py10
2 files changed, 7 insertions, 4 deletions
diff --git a/pkg/pyinst/app.spec b/pkg/pyinst/app.spec
index fa13bf17..6e11aa60 100644
--- a/pkg/pyinst/app.spec
+++ b/pkg/pyinst/app.spec
@@ -17,6 +17,7 @@ if IS_MAC:
hiddenimports = [
'appdirs',
'scrypt', 'zope.interface', 'zope.proxy',
+ 'psutil',
'leap.pixelated_www', 'pixelated', 'chardet', 'whoosh', 'requests',
'pysqlcipher', 'service_identity',
'leap.common', 'leap.bitmask',
diff --git a/src/leap/bitmask/vpn/helpers/__init__.py b/src/leap/bitmask/vpn/helpers/__init__.py
index 17281a52..9be2150d 100644
--- a/src/leap/bitmask/vpn/helpers/__init__.py
+++ b/src/leap/bitmask/vpn/helpers/__init__.py
@@ -4,15 +4,17 @@ import os.path
import sys
from leap.bitmask.vpn.constants import IS_LINUX, IS_MAC
-from leap.bitmask.vpn.constants import BITMASK_ROOT_SYSTEM, BITMASK_ROOT_LOCAL
-from leap.bitmask.vpn.constants import OPENVPN_SYSTEM, OPENVPN_LOCAL
-from leap.bitmask.vpn.constants import POLKIT_SYSTEM, POLKIT_LOCAL
-from leap.bitmask.vpn.privilege import is_pkexec_in_system
from leap.bitmask.vpn import _config
from leap.bitmask.util import STANDALONE
if IS_LINUX:
+
+ from leap.bitmask.vpn.constants import BITMASK_ROOT_SYSTEM, BITMASK_ROOT_LOCAL
+ from leap.bitmask.vpn.constants import OPENVPN_SYSTEM, OPENVPN_LOCAL
+ from leap.bitmask.vpn.constants import POLKIT_SYSTEM, POLKIT_LOCAL
+ from leap.bitmask.vpn.privilege import is_pkexec_in_system
+
def install():
helper_from = _config.get_bitmask_helper_path()
polkit_from = _config.get_bitmask_polkit_policy_path()