summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-16 17:18:16 -0400
committerKali Kaneko <kali@leap.se>2017-08-16 17:29:36 -0400
commitb7d215fe4b936527c6875f36e80fbd2ef1524f54 (patch)
tree961290b580091cd5a75ea13aca0b4171d81e5539
parent3b4508dff9dc1a681f3c96edcef4e43aa3da29a8 (diff)
[bug] avoid state flickering when state string is empty
we set status to 'off' by default. - Resolves: #9013
-rw-r--r--src/leap/bitmask/vpn/_status.py3
-rw-r--r--src/leap/bitmask/vpn/process.py12
2 files changed, 3 insertions, 12 deletions
diff --git a/src/leap/bitmask/vpn/_status.py b/src/leap/bitmask/vpn/_status.py
index 5d41a535..5cf0cc77 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 8506eb61..3a86160b 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()