From 733dc642962c14cd664aba694e4d3b5300e69d8b Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 28 Mar 2014 11:37:13 -0300 Subject: Move openvpn_verb to config.flags --- src/leap/bitmask/app.py | 3 +-- src/leap/bitmask/config/flags.py | 4 +++- src/leap/bitmask/gui/mainwindow.py | 3 +-- src/leap/bitmask/services/eip/vpnprocess.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index ca1226de..0a315be7 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -200,7 +200,6 @@ def main(): debug = opts.debug logfile = opts.log_file mail_logfile = opts.mail_log_file - openvpn_verb = opts.openvpn_verb start_hidden = opts.start_hidden ############################################################# @@ -214,6 +213,7 @@ def main(): flags.MAIL_LOGFILE = mail_logfile flags.APP_VERSION_CHECK = opts.app_version_check flags.API_VERSION_CHECK = opts.api_version_check + flags.OPENVPN_VERBOSITY = opts.openvpn_verb flags.CA_CERT_FILE = opts.ca_cert_file @@ -307,7 +307,6 @@ def main(): window = MainWindow( lambda: twisted_main.quit(app), - openvpn_verb=openvpn_verb, bypass_checks=bypass_checks, start_hidden=start_hidden) diff --git a/src/leap/bitmask/config/flags.py b/src/leap/bitmask/config/flags.py index 5d8bc9b3..7cc8711c 100644 --- a/src/leap/bitmask/config/flags.py +++ b/src/leap/bitmask/config/flags.py @@ -46,7 +46,9 @@ API_VERSION_CHECK = True # Used for skipping soledad bootstrapping/syncs. OFFLINE = False - # CA cert path # used to allow self signed certs in requests that needs SSL CA_CERT_FILE = None + +# OpenVPN verbosity level +OPENVPN_VERBOSITY = 1 diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 83a6ce45..6eaf2dfb 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -118,7 +118,6 @@ class MainWindow(QtGui.QMainWindow): SERVICE_STOP_TIMEOUT = 20 def __init__(self, quit_callback, - openvpn_verb=1, bypass_checks=False, start_hidden=False): """ @@ -226,7 +225,7 @@ class MainWindow(QtGui.QMainWindow): self._backend_connected_signals = {} self._backend_connect() - self._vpn = VPN(openvpn_verb=openvpn_verb) + self._vpn = VPN() # connect vpn process signals self._vpn.qtsigs.state_changed.connect( diff --git a/src/leap/bitmask/services/eip/vpnprocess.py b/src/leap/bitmask/services/eip/vpnprocess.py index 5c100036..4f797722 100644 --- a/src/leap/bitmask/services/eip/vpnprocess.py +++ b/src/leap/bitmask/services/eip/vpnprocess.py @@ -35,6 +35,7 @@ except ImportError: from PySide import QtCore +from leap.bitmask.config import flags from leap.bitmask.config.providerconfig import ProviderConfig from leap.bitmask.services.eip import get_vpn_launcher from leap.bitmask.services.eip.eipconfig import EIPConfig @@ -183,8 +184,7 @@ class VPN(object): self._reactor = reactor self._qtsigs = VPNSignals() - # XXX should get it from config.flags - self._openvpn_verb = kwargs.get(self.OPENVPN_VERB, None) + self._openvpn_verb = flags.OPENVPN_VERBOSITY @property def qtsigs(self): -- cgit v1.2.3