summaryrefslogtreecommitdiff
path: root/src/leap/eip/eipconnection.py
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2012-08-21 10:27:43 -0700
committerantialias <antialias@leap.se>2012-08-21 10:27:43 -0700
commitaf33eaa36c3b799a14a56b7845db3833ed52b97d (patch)
tree62773680916041a28abf30ec639879c98223173b /src/leap/eip/eipconnection.py
parentac00ec313a142e910447857c0e46e6d36c7f2ab2 (diff)
parent560232609ef229d46932f8ffcd66b8e114e8b3e6 (diff)
Merge branch 'refactor' into json-config
Diffstat (limited to 'src/leap/eip/eipconnection.py')
-rw-r--r--src/leap/eip/eipconnection.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/leap/eip/eipconnection.py b/src/leap/eip/eipconnection.py
index 139ee750..2dfc1503 100644
--- a/src/leap/eip/eipconnection.py
+++ b/src/leap/eip/eipconnection.py
@@ -4,7 +4,9 @@ EIP Connection Class
from __future__ import (absolute_import,)
import logging
+logging.basicConfig()
logger = logging.getLogger(name=__name__)
+logger.setLevel(logging.DEBUG)
from leap.base.connection import ConnectionError
from leap.eip import exceptions as eip_exceptions
@@ -67,12 +69,17 @@ class EIPConnection(OpenVPNConnection):
def poll_connection_state(self):
"""
"""
+ # XXX this separation does not
+ # make sense anymore after having
+ # merged Connection and Manager classes.
try:
state = self.get_connection_state()
except eip_exceptions.ConnectionRefusedError:
# connection refused. might be not ready yet.
+ logger.warning('connection refused')
return
if not state:
+ logger.debug('no state')
return
(ts, status_step,
ok, ip, remote) = state
@@ -172,9 +179,9 @@ class EIPConnectionStatus(object):
:param callbacks: a tuple of (callable) observers
:type callbacks: tuple
"""
- # (callbacks to connect to signals in Qt-land)
self.current = self.DISCONNECTED
self.previous = None
+ # (callbacks to connect to signals in Qt-land)
self.callbacks = callbacks
def get_readable_status(self):