summaryrefslogtreecommitdiff
path: root/src/leap/eip/eipconnection.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-22 01:30:37 +0900
committerkali <kali@leap.se>2012-08-22 01:30:37 +0900
commit560232609ef229d46932f8ffcd66b8e114e8b3e6 (patch)
treecc39b180c09711eeba6bb858cdea05f4f0fbda0c /src/leap/eip/eipconnection.py
parentaf77050ce07ad884a39459a12bf22b74f6a858ab (diff)
yay! First WORKING GUI in refactor branch :)
Obviously then, you should ignore the commit message in 489ed46140d6d. That commit WAS NOT working, believe me :) Fix an annoying bug by which we were overwriting the "connect" method that came from vpnmanager with basically an empty stub.
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):