From b94de93268867e8cab533f29e85110e2c35d2bda Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 16 Aug 2017 17:18:16 -0400 Subject: [bug] avoid state flickering when state string is empty we set status to 'off' by default. - Resolves: #9013 --- src/leap/bitmask/vpn/_status.py | 3 +++ src/leap/bitmask/vpn/process.py | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'src/leap/bitmask/vpn') diff --git a/src/leap/bitmask/vpn/_status.py b/src/leap/bitmask/vpn/_status.py index 5d41a53..5cf0cc7 100644 --- a/src/leap/bitmask/vpn/_status.py +++ b/src/leap/bitmask/vpn/_status.py @@ -67,6 +67,9 @@ class VPNStatus(object): return status def set_status(self, status, errcode): + if not status: + return + if status in self._STARTING: status = "starting" elif status in self._STOPPING: diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py index 8506eb6..3a86160 100644 --- a/src/leap/bitmask/vpn/process.py +++ b/src/leap/bitmask/vpn/process.py @@ -237,18 +237,6 @@ class _VPNProcess(protocol.ProcessProtocol): self.log.debug("{0}".format(" ".join(command))) return command - def getGateways(self): - """ - Get the gateways from the appropiate launcher. - - :rtype: list - """ - gateways_ports = self._launcher.get_gateways( - self._vpnconfig, self._providerconfig) - - # filter out ports since we don't need that info - return [gateway for gateway, port in gateways_ports] - def get_openvpn_process(self): return self._management.get_openvpn_process() -- cgit v1.2.3