From 7a8f4db1a4743582c34a52ab448eece0e7689bc8 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 28 Aug 2012 23:36:39 +0900 Subject: test for eip_config_checker called from eip_connection run_checks method also: - changed name EIPChecker -> EipConfigChecker - Added class documentation --- src/leap/eip/eipconnection.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/leap/eip/eipconnection.py') diff --git a/src/leap/eip/eipconnection.py b/src/leap/eip/eipconnection.py index aea560c9..386b71be 100644 --- a/src/leap/eip/eipconnection.py +++ b/src/leap/eip/eipconnection.py @@ -8,7 +8,7 @@ logging.basicConfig() logger = logging.getLogger(name=__name__) logger.setLevel(logging.DEBUG) -from leap.eip.checks import EIPChecker +from leap.eip.checks import EIPConfigChecker from leap.eip import exceptions as eip_exceptions from leap.eip.openvpnconnection import OpenVPNConnection @@ -18,18 +18,19 @@ class EIPConnection(OpenVPNConnection): Manages the execution of the OpenVPN process, auto starts, monitors the network connection, handles configuration, fixes leaky hosts, handles errors, etc. - Preferences will be stored via the Storage API. (TBD) Status updates (connected, bandwidth, etc) are signaled to the GUI. """ - def __init__(self, checker=EIPChecker, *args, **kwargs): + def __init__(self, config_checker=EIPConfigChecker, *args, **kwargs): self.settingsfile = kwargs.get('settingsfile', None) self.logfile = kwargs.get('logfile', None) + + # not used atm. but should. self.error_queue = [] status_signals = kwargs.pop('status_signals', None) self.status = EIPConnectionStatus(callbacks=status_signals) - self.checker = checker() + self.config_checker = config_checker() super(EIPConnection, self).__init__(*args, **kwargs) @@ -37,7 +38,7 @@ class EIPConnection(OpenVPNConnection): """ run all eip checks previous to attempting a connection """ - self.checker.run_all(skip_download=skip_download) + self.config_checker.run_all(skip_download=skip_download) def connect(self): """ -- cgit v1.2.3