summaryrefslogtreecommitdiff
path: root/src/leap/eip/eipconnection.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-28 23:36:39 +0900
committerkali <kali@leap.se>2012-08-29 03:25:46 +0900
commit7a8f4db1a4743582c34a52ab448eece0e7689bc8 (patch)
tree19cb1b95d6cf1e7fe3fecd4027f472bc7faa7715 /src/leap/eip/eipconnection.py
parent06883461f2daa616b2e3c842f53d9422703cd9c7 (diff)
test for eip_config_checker called from eip_connection run_checks method
also: - changed name EIPChecker -> EipConfigChecker - Added class documentation
Diffstat (limited to 'src/leap/eip/eipconnection.py')
-rw-r--r--src/leap/eip/eipconnection.py11
1 files changed, 6 insertions, 5 deletions
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):
"""