summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/vpn.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-03-17 00:34:12 +0100
committerRuben Pollan <meskio@sindominio.net>2017-03-17 00:42:13 +0100
commit09bf881b4f457f731c5a49e88822bc731eda2c96 (patch)
tree1c164fd3381cfe68d05a5f09f7f52f3756615b5a /src/leap/bitmask/vpn/vpn.py
parent4fe2ad820ab46f522682bcaece55a400c7038378 (diff)
[feat] report the real status of the VPN
Diffstat (limited to 'src/leap/bitmask/vpn/vpn.py')
-rw-r--r--src/leap/bitmask/vpn/vpn.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/leap/bitmask/vpn/vpn.py b/src/leap/bitmask/vpn/vpn.py
index e19f6629..dc3062af 100644
--- a/src/leap/bitmask/vpn/vpn.py
+++ b/src/leap/bitmask/vpn/vpn.py
@@ -18,6 +18,7 @@
from colorama import Fore
+from leap.bitmask.util import merge_status
from leap.bitmask.vpn.manager import TunnelManager
from leap.bitmask.vpn.fw.firewall import FirewallManager
@@ -68,14 +69,8 @@ class VPNManager(object):
return True
def get_status(self):
- vpn_status = self._vpn.status
- # TODO use firewall.is_up instead
- fw_status = self._firewall.status
-
- result = {'VPN': vpn_status,
- 'firewall': fw_status}
- if vpn_status == 'CONNECTED':
- traffic = self._vpn.traffic_status
- result['↑↑↑'] = traffic['up']
- result['↓↓↓'] = traffic['down']
- return result
+ childrenStatus = {
+ "vpn": self._vpn.status,
+ "firewall": self._firewall.status
+ }
+ return merge_status(childrenStatus)