summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-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")