diff options
author | Kali Kaneko <kali@leap.se> | 2013-10-30 16:33:41 -0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-10-30 16:33:41 -0200 |
commit | 8766b396cb7faf84c6eab3b2516229c791fe2e90 (patch) | |
tree | 7fae4c8ae7119d58c98ecc8c13b6ad3d2a009a77 /src/leap/bitmask/services/eip/linuxvpnlauncher.py | |
parent | f22b1a04f892857d162d87f9c9e120e7c5daadf7 (diff) | |
parent | a06b5719f028e619a4b3800fb346ed3c984e4d25 (diff) |
Merge tag '0.3.5' into debian
Tag leap.bitmask version 0.3.5
Conflicts:
.gitignore
pkg/requirements.pip
Diffstat (limited to 'src/leap/bitmask/services/eip/linuxvpnlauncher.py')
-rw-r--r-- | src/leap/bitmask/services/eip/linuxvpnlauncher.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py index c2c28627..efb23285 100644 --- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py +++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py @@ -61,9 +61,13 @@ def _is_auth_agent_running(): :return: True if it's running, False if it's not. :rtype: boolean """ - ps = 'ps aux | grep polkit-%s-authentication-agent-1' - opts = (ps % case for case in ['[g]nome', '[k]de']) - is_running = map(lambda l: commands.getoutput(l), opts) + # the [x] thing is to avoid grep match itself + polkit_options = [ + 'ps aux | grep polkit-[g]nome-authentication-agent-1', + 'ps aux | grep polkit-[k]de-authentication-agent-1', + 'ps aux | grep [l]xpolkit' + ] + is_running = [commands.getoutput(cmd) for cmd in polkit_options] return any(is_running) |