summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-28 23:42:53 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:56 -0400
commitec3c4a21b24afac389a10bdbbb9ac36acd2a6ffb (patch)
tree8e9ef63ae61244641421d858fe08f0410bfd6ada
parent081ef137ab4d1325a46a24752b11a60b953c1bb4 (diff)
[bug] assign initial empty state
-rw-r--r--Makefile2
-rw-r--r--src/leap/bitmask/vpn/management.py1
-rw-r--r--src/leap/bitmask/vpn/process.py3
-rw-r--r--src/leap/bitmask/vpn/tunnel.py6
4 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7a734f42..62f08026 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ test_functional_setup:
pip install -U behave selenium
test_functional: install_helpers
- test -f /usr/bin/lxpolkit && lkpolkit &
+ test -f /usr/bin/lxpolkit && lxpolkit &
xvfb-run --server-args="-screen 0 1280x1024x24" behave --tags ~@wip --tags @smoke tests/functional/features -k --no-capture -D host=localhost
test_functional_graphical:
diff --git a/src/leap/bitmask/vpn/management.py b/src/leap/bitmask/vpn/management.py
index 6a6b1fc2..4f0e97b8 100644
--- a/src/leap/bitmask/vpn/management.py
+++ b/src/leap/bitmask/vpn/management.py
@@ -148,6 +148,7 @@ class ManagementProtocol(LineReceiver):
def _handle_STATE(self, data):
data = data.strip().split(',')
remote = rport = None
+ state = ''
try:
if len(data) == 9:
(ts, state, verbose, localtun,
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py
index d35857c7..8c61db21 100644
--- a/src/leap/bitmask/vpn/process.py
+++ b/src/leap/bitmask/vpn/process.py
@@ -91,7 +91,8 @@ class _VPNProcess(protocol.ProcessProtocol):
if socket_port == 'unix':
folder = os.path.split(self._host)[0]
- assert os.path.isfile(folder)
+ if not os.path.isdir(folder):
+ os.makedirs(folder)
self._management_endpoint = clientFromString(
reactor, b"unix:path=%s" % socket_host)
else:
diff --git a/src/leap/bitmask/vpn/tunnel.py b/src/leap/bitmask/vpn/tunnel.py
index 831f04d2..ce4707af 100644
--- a/src/leap/bitmask/vpn/tunnel.py
+++ b/src/leap/bitmask/vpn/tunnel.py
@@ -50,7 +50,7 @@ class ConfiguredTunnel(object):
On start, it spawns a VPNProcess instance that will use a vpnlauncher
suited for the running platform and connect to the management interface
opened by the openvpn process, executing commands over that interface on
- demand.
+ demand
"""
log = Logger()
@@ -100,8 +100,8 @@ class ConfiguredTunnel(object):
@defer.inlineCallbacks
def _start_vpn(self):
self.log.debug('VPN: start')
- args = [self._vpnconfig, self._providerconfig, self._host,
- self._port]
+ args = [self._vpnconfig, self._providerconfig,
+ self._host, self._port]
kwargs = {'openvpn_verb': 4, 'remotes': self._remotes,
'restartfun': self._restart_vpn}
vpnproc = VPNProcess(*args, **kwargs)