diff options
author | Kali Kaneko <kali@leap.se> | 2013-09-05 21:13:51 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-09-05 21:13:51 +0200 |
commit | b968f83b712c44945f123a077bba18955b738d35 (patch) | |
tree | 965debab6d84ce1c3c65c403550bcb8f36bd1c3e /src/leap/bitmask/services/eip | |
parent | 75109de1283be85309d1795d518ef8a8c2ef4f07 (diff) | |
parent | 6d2c5a14f51363a791fbc264f7e8d6cb4b69b6d2 (diff) |
Merge remote-tracking branch 'ivan-github/bug/fix-test-release-version' into develop
Diffstat (limited to 'src/leap/bitmask/services/eip')
-rw-r--r-- | src/leap/bitmask/services/eip/vpnlaunchers.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/leap/bitmask/services/eip/vpnlaunchers.py b/src/leap/bitmask/services/eip/vpnlaunchers.py index 49edc8eb..a50da8b9 100644 --- a/src/leap/bitmask/services/eip/vpnlaunchers.py +++ b/src/leap/bitmask/services/eip/vpnlaunchers.py @@ -32,6 +32,7 @@ except ImportError: from abc import ABCMeta, abstractmethod from functools import partial +from time import sleep from leap.bitmask.config.leapsettings import LeapSettings @@ -228,7 +229,11 @@ def _try_to_launch_agent(standalone=False): env = { "PYTHONPATH": os.path.abspath('../../../../lib/')} try: - subprocess.call(["python", "-m", "leap.bitmask.util.polkit_agent"], + # We need to quote the command because subprocess call + # will do "sh -c 'foo'", so if we do not quoute it we'll end + # up with a invocation to the python interpreter. And that + # is bad. + subprocess.call(["python -m leap.bitmask.util.polkit_agent"], shell=True, env=env) except Exception as exc: logger.exception(exc) @@ -316,6 +321,7 @@ class LinuxVPNLauncher(VPNLauncher): if _is_pkexec_in_system(): if not _is_auth_agent_running(): _try_to_launch_agent(ProviderConfig.standalone) + sleep(0.5) if _is_auth_agent_running(): pkexec_possibilities = which(kls.PKEXEC_BIN) leap_assert(len(pkexec_possibilities) > 0, |