From 560232609ef229d46932f8ffcd66b8e114e8b3e6 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 22 Aug 2012 01:30:37 +0900 Subject: 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. --- src/leap/eip/eipconnection.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/leap/eip/eipconnection.py') 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): -- cgit v1.2.3