summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/process.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-02-21 14:00:57 +0100
committerKali Kaneko <kali@leap.se>2018-03-02 03:54:09 +0100
commitc1125e43a8191d8941e7dccc5b3afa01558d88c4 (patch)
tree8ba7a8e9eb99ed64fd02cd0731a3bc52edb566c2 /src/leap/bitmask/vpn/process.py
parenteafa6707a2adbab1cab85daab6172a620f261118 (diff)
[bug] debug launching
Diffstat (limited to 'src/leap/bitmask/vpn/process.py')
-rw-r--r--src/leap/bitmask/vpn/process.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py
index 27cb51ec..35ccf9f6 100644
--- a/src/leap/bitmask/vpn/process.py
+++ b/src/leap/bitmask/vpn/process.py
@@ -293,17 +293,24 @@ class _VPNProcess(protocol.ProcessProtocol):
:rtype: list of str
"""
- command = self._launcher.get_vpn_command(
- vpnconfig=self._vpnconfig,
- providerconfig=self._providerconfig,
- socket_host=self._host,
- socket_port=self._port,
- remotes=self._remotes)
+ print("GETTING COMMAND", self._launcher)
+ try:
+ command = self._launcher.get_vpn_command(
+ vpnconfig=self._vpnconfig,
+ providerconfig=self._providerconfig,
+ socket_host=self._host,
+ socket_port=self._port,
+ remotes=self._remotes)
+ print("Command: %s", command)
+ except Exception as exc:
+ print("ERROR: %r" % exc)
encoding = sys.getfilesystemencoding()
+ print("encoding", encoding)
for i, c in enumerate(command):
if not isinstance(c, str):
command[i] = c.encode(encoding)
+ print("command: %s", command)
self.log.debug("Running VPN with command: ")
self.log.debug("{0}".format(" ".join(command)))