diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-06-29 13:06:19 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-07-14 14:29:40 +0200 |
commit | b5470367a74fb09fb30dc56fe6a22254fe25d18e (patch) | |
tree | 98e571ba0e71dcd52a9b19ef1f8131f6ef94f611 /src/leap | |
parent | a20fe33472698c5c95df799eeaf3a1c0f415e4d5 (diff) |
[bug] don't raise exceptions stoping the VPN service
Let's also catch the exceptions raised by stopping services so bitmaskd can
stop.
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/core/service.py | 5 | ||||
-rw-r--r-- | src/leap/bitmask/vpn/service.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/leap/bitmask/core/service.py b/src/leap/bitmask/core/service.py index 2da1ee4c..6244b17e 100644 --- a/src/leap/bitmask/core/service.py +++ b/src/leap/bitmask/core/service.py @@ -246,7 +246,10 @@ class BitmaskBackend(configurable.ConfigurableService): def do_stop(self): for service in self: - service.stopService() + try: + service.stopService() + except Exception as e: + log.error('Error stopping service... {0!r}'.format(e)) return self.core_commands.do_stop() # Service Toggling diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py index 343a2d35..70c26248 100644 --- a/src/leap/bitmask/vpn/service.py +++ b/src/leap/bitmask/vpn/service.py @@ -67,7 +67,10 @@ class VPNService(HookableService): super(VPNService, self).startService() def stopService(self): - self.stop_vpn() + try: + self.stop_vpn() + except Exception as e: + self.log.error('Error stopping vpn service... {0!r}'.format(e)) super(VPNService, self).stopService() @defer.inlineCallbacks |