From f54ab060a65cf066250cfa301e1cca02e3e81fc7 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Tue, 13 Jun 2017 19:04:36 +0200 Subject: [bug] only assign class variable once --- src/leap/bitmask/vpn/launchers/darwin.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/vpn/launchers/darwin.py b/src/leap/bitmask/vpn/launchers/darwin.py index afe3358..d83ede2 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): -- cgit v1.2.3