diff options
author | Kali Kaneko <kali@leap.se> | 2017-08-22 17:48:12 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-30 16:17:59 -0400 |
commit | a4e14e01b1f8259f72b27712c53bd50c0a8bf20f (patch) | |
tree | 6fad82b801f0f63e8a78ecfc4154ab61c3cf8bb1 /src | |
parent | b7b8296c24017ccc2a04cdd0682f4905b8fcf8d7 (diff) |
[refactor] remove unused imports and attrs
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/bitmask/vpn/gateways.py | 5 | ||||
-rw-r--r-- | src/leap/bitmask/vpn/launcher.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/vpn/tunnel.py | 8 |
3 files changed, 1 insertions, 16 deletions
diff --git a/src/leap/bitmask/vpn/gateways.py b/src/leap/bitmask/vpn/gateways.py index a7a8fb3..a1be1c1 100644 --- a/src/leap/bitmask/vpn/gateways.py +++ b/src/leap/bitmask/vpn/gateways.py @@ -19,13 +19,8 @@ Gateway Selection """ import copy -import logging -import os -import re import time -from leap.common.config import get_path_prefix - def _normalized(label): return label.lower().replace(',', '_').replace(' ', '_') diff --git a/src/leap/bitmask/vpn/launcher.py b/src/leap/bitmask/vpn/launcher.py index 5f4881c..71173a0 100644 --- a/src/leap/bitmask/vpn/launcher.py +++ b/src/leap/bitmask/vpn/launcher.py @@ -20,16 +20,14 @@ Platform-independent VPN launcher interface. """ import getpass -import hashlib import os import stat from twisted.logger import Logger from abc import ABCMeta, abstractmethod -from functools import partial -from leap.bitmask.vpn.constants import IS_LINUX, IS_MAC +from leap.bitmask.vpn.constants import IS_MAC from leap.bitmask.vpn.utils import force_eval diff --git a/src/leap/bitmask/vpn/tunnel.py b/src/leap/bitmask/vpn/tunnel.py index f56e7bc..a83704f 100644 --- a/src/leap/bitmask/vpn/tunnel.py +++ b/src/leap/bitmask/vpn/tunnel.py @@ -80,9 +80,7 @@ class ConfiguredTunnel(object): host, port = _get_management_location() self._host = host self._port = port - self._vpnproc = None - self._user_stopped = False def start(self): return self._start_vpn() @@ -106,9 +104,6 @@ class ConfiguredTunnel(object): def _start_vpn(self): self.log.debug('VPN: start') - - self._user_stopped = False - args = [self._vpnconfig, self._providerconfig, self._host, self._port] kwargs = {'openvpn_verb': 4, 'remotes': self._remotes, @@ -161,9 +156,6 @@ class ConfiguredTunnel(object): # TODO how to return False if this fails # XXX maybe return a deferred - # We assume that the only valid stops are initiated - # by an user action, not hard restarts - self._user_stopped = not restart if self._vpnproc is not None: self._vpnproc.restarting = restart |