From 96ddbd359804d47f81b9572dd56f4a991d7c1e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 14 Oct 2013 15:33:35 -0300 Subject: Disable stdout redirection on windows for now since it breaks the bundle --- src/leap/bitmask/app.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index 5982fe91..75bf7123 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -54,6 +54,7 @@ from leap.bitmask.util import leap_argparse from leap.bitmask.util import log_silencer from leap.bitmask.util.leap_log_handler import LeapLogHandler from leap.bitmask.util.streamtologger import StreamToLogger +from leap.bitmask.platform_init import IS_WIN from leap.common.events import server as event_server import codecs @@ -140,12 +141,15 @@ def replace_stdout_stderr_with_logging(logger): - the twisted log output with a custom one that writes to the logger. """ - sys.stdout = StreamToLogger(logger, logging.DEBUG) - sys.stderr = StreamToLogger(logger, logging.ERROR) - - # Replace twisted's logger to use our custom output. - from twisted.python import log - log.startLogging(sys.stdout) + # Disabling this on windows since it breaks ALL THE THINGS + # The issue for this is #4149 + if not IS_WIN: + sys.stdout = StreamToLogger(logger, logging.DEBUG) + sys.stderr = StreamToLogger(logger, logging.ERROR) + + # Replace twisted's logger to use our custom output. + from twisted.python import log + log.startLogging(sys.stdout) def main(): -- cgit v1.2.3 From 23107e1cf7670b0ee01c73284bbf9d7a21e4a92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 14 Oct 2013 15:34:42 -0300 Subject: Default UP/DOWN_SCRIPTs to None and add them only if not None --- src/leap/bitmask/services/eip/vpnlauncher.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/services/eip/vpnlauncher.py b/src/leap/bitmask/services/eip/vpnlauncher.py index 2ac4c325..bce3599b 100644 --- a/src/leap/bitmask/services/eip/vpnlauncher.py +++ b/src/leap/bitmask/services/eip/vpnlauncher.py @@ -102,6 +102,8 @@ class VPNLauncher(object): UPDOWN_FILES = None OTHER_FILES = None + UP_SCRIPT = None + DOWN_SCRIPT = None @classmethod @abstractmethod @@ -211,15 +213,17 @@ class VPNLauncher(object): '--script-security', '2' ] - if _has_updown_scripts(kls.UP_SCRIPT): - args += [ - '--up', '\"%s\"' % (kls.UP_SCRIPT,), - ] - - if _has_updown_scripts(kls.DOWN_SCRIPT): - args += [ - '--down', '\"%s\"' % (kls.DOWN_SCRIPT,) - ] + if kls.UP_SCRIPT is not None: + if _has_updown_scripts(kls.UP_SCRIPT): + args += [ + '--up', '\"%s\"' % (kls.UP_SCRIPT,), + ] + + if kls.DOWN_SCRIPT is not None: + if _has_updown_scripts(kls.DOWN_SCRIPT): + args += [ + '--down', '\"%s\"' % (kls.DOWN_SCRIPT,) + ] ########################################################### # For the time being we are disabling the usage of the -- cgit v1.2.3 From e1e946cd78e0a30a88aca1a24624fcf0878753be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 14 Oct 2013 15:35:09 -0300 Subject: Use .exe extension on windows --- src/leap/bitmask/services/soledad/soledadbootstrapper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index 409389be..4619ba80 100644 --- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py +++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py @@ -34,6 +34,7 @@ from leap.bitmask.services.abstractbootstrapper import AbstractBootstrapper from leap.bitmask.services.soledad.soledadconfig import SoledadConfig from leap.bitmask.util import is_file, is_empty_file from leap.bitmask.util import get_path_prefix +from leap.bitmask.platform_init import IS_WIN from leap.common.check import leap_assert, leap_assert_type, leap_check from leap.common.files import which from leap.keymanager import KeyManager, openpgp @@ -319,11 +320,12 @@ class SoledadBootstrapper(AbstractBootstrapper): :returns: the gpg binary path :rtype: str """ - # TODO: Fix for Windows gpgbin = None if flags.STANDALONE: gpgbin = os.path.join( get_path_prefix(), "..", "apps", "mail", "gpg") + if IS_WIN: + gpgbin += ".exe" else: try: gpgbin_options = which("gpg") -- cgit v1.2.3