summaryrefslogtreecommitdiff
path: root/src/leap/eip
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-09-20 04:39:50 +0900
committerkali <kali@leap.se>2012-09-20 04:39:50 +0900
commitf2749fa3ff1df5875d3bc0b932a408031fee9874 (patch)
treeda78596104a8cfe906f3a6f469d23157ac4803d7 /src/leap/eip
parentcbd474e49e12e5fc0677dafe331b9c5ab3a2539a (diff)
toggle connection on/off
Diffstat (limited to 'src/leap/eip')
-rw-r--r--src/leap/eip/config.py1
-rw-r--r--src/leap/eip/openvpnconnection.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/src/leap/eip/config.py b/src/leap/eip/config.py
index 44922310..e5fcd164 100644
--- a/src/leap/eip/config.py
+++ b/src/leap/eip/config.py
@@ -112,7 +112,6 @@ def build_ovpn_options(daemon=False, socket_path=None, **kwargs):
# remote
opts.append('--remote')
gw = get_eip_gateway()
- #gw = "springbokvpn.org"
logger.debug('setting eip gateway to %s', gw)
opts.append(str(gw))
opts.append('1194')
diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py
index 92ae9de9..e32d584c 100644
--- a/src/leap/eip/openvpnconnection.py
+++ b/src/leap/eip/openvpnconnection.py
@@ -163,8 +163,13 @@ to be triggered for each one of them.
"""
terminates child subprocess
"""
+ # XXX we should send a quit process using management
+ # interface.
if self.subp:
- self.subp.terminate()
+ try:
+ self.subp.terminate()
+ except OSError:
+ logger.error('cannot terminate subprocess!')
#
# management methods