summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-18 20:59:51 +0900
committerkali <kali@leap.se>2012-12-18 20:59:51 +0900
commit8808c0e2cba1660515fab4a2931221c3bda7e093 (patch)
tree5e74d761876f7acbf2fef2da0e8e4cd7377d54b1 /src
parent34cdc516cbdef476d0329fff5d09d6eb0e85431f (diff)
do not assume that we were the only ones launching openvpn
Diffstat (limited to 'src')
-rw-r--r--src/leap/eip/openvpnconnection.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py
index 59ba44f0..c2dc71a6 100644
--- a/src/leap/eip/openvpnconnection.py
+++ b/src/leap/eip/openvpnconnection.py
@@ -374,8 +374,9 @@ to be triggered for each one of them.
logger.debug('process :%s' % process)
cmdline = process.cmdline
- if isinstance(cmdline, list):
- _index = cmdline.index("--management")
+ manag_flag = "--management"
+ if isinstance(cmdline, list) and manag_flag in cmdline:
+ _index = cmdline.index(manag_flag)
self.host = cmdline[_index + 1]
self._send_command("signal SIGTERM\n")