diff options
Diffstat (limited to 'src/leap/bitmask/vpn/vpn.py')
-rw-r--r-- | src/leap/bitmask/vpn/vpn.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/leap/bitmask/vpn/vpn.py b/src/leap/bitmask/vpn/vpn.py index e19f662..dc3062a 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) |