summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-06-13 19:04:36 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-06-13 19:04:36 +0200
commitf54ab060a65cf066250cfa301e1cca02e3e81fc7 (patch)
tree5b93fc885beb679275fd157483d5272e32ef306f /src/leap/bitmask/vpn
parent8ca3509fec6a34589337e05fc2fb7505bdef97ac (diff)
[bug] only assign class variable once
Diffstat (limited to 'src/leap/bitmask/vpn')
-rw-r--r--src/leap/bitmask/vpn/launchers/darwin.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/bitmask/vpn/launchers/darwin.py b/src/leap/bitmask/vpn/launchers/darwin.py
index afe3358b..d83ede25 100644
--- a/src/leap/bitmask/vpn/launchers/darwin.py
+++ b/src/leap/bitmask/vpn/launchers/darwin.py
@@ -87,12 +87,15 @@ class DarwinVPNLauncher(VPNLauncher):
OPENVPN_PATH = "%s/Contents/Resources/openvpn" % (INSTALL_PATH,)
OPENVPN_PATH_ESCAPED = "%s/Contents/Resources/openvpn" % (
INSTALL_PATH_ESCAPED,)
- OPENVPN_BIN_PATH = "%s/Contents/Resources/%s" % (INSTALL_PATH,
- OPENVPN_BIN)
- if not os.path.isfile(OPENVPN_BIN_PATH):
+ OTHER_FILES = []
+
+ _openvpn_bin_path = "%s/Contents/Resources/%s" % (
+ INSTALL_PATH, OPENVPN_BIN)
+ if os.path.isfile(_openvpn_bin_path):
+ OPENVPN_BIN_PATH = _openvpn_bin_path
+ else:
# let's try with the homebrew path
OPENVPN_BIN_PATH = '/usr/local/sbin/openvpn'
- OTHER_FILES = []
@classmethod
def is_kext_loaded(kls):