From af77050ce07ad884a39459a12bf22b74f6a858ab Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 22 Aug 2012 01:29:41 +0900 Subject: clean imports and remove connection base method --- src/leap/base/connection.py | 37 ++++++++++++++----------------------- src/leap/baseapp/mainwindow.py | 3 --- 2 files changed, 14 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/leap/base/connection.py b/src/leap/base/connection.py index cd0ae565..8cd78433 100644 --- a/src/leap/base/connection.py +++ b/src/leap/base/connection.py @@ -3,17 +3,8 @@ Base Connection Classs """ from __future__ import (division, unicode_literals, print_function) -#XXX move these imports to util.coroutines!!! - -#import threading -#from functools import partial import logging -#from leap.utils.coroutines import spawn_and_watch_process -#from leap.baseapp.config import get_config, get_vpn_stdout_mockup -#from leap.eip.vpnwatcher import EIPConnectionStatus, status_watcher -from leap.eip.vpnmanager import ConnectionRefusedError - from leap.base.configuration import Configuration from leap.base.authentication import Authentication @@ -58,21 +49,21 @@ class Connection(Configuration, Authentication): """ return self.desired_connection_state - def poll_connection_state(self): - """ - """ - try: - state = self.get_connection_state() - except ConnectionRefusedError: + #def poll_connection_state(self): + #""" + #""" + #try: + #state = self.get_connection_state() + #except ConnectionRefusedError: # connection refused. might be not ready yet. - return - if not state: - return - (ts, status_step, - ok, ip, remote) = state - self.status.set_vpn_state(status_step) - status_step = self.status.get_readable_status() - return (ts, status_step, ok, ip, remote) + #return + #if not state: + #return + #(ts, status_step, + #ok, ip, remote) = state + #self.status.set_vpn_state(status_step) + #status_step = self.status.get_readable_status() + #return (ts, status_step, ok, ip, remote) def get_icon_name(self): """ diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index c5bdd8e9..bc844437 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -13,9 +13,6 @@ from PyQt4.QtCore import (pyqtSlot, pyqtSignal, QTimer) from leap.baseapp.dialogs import ErrorDialog -#from leap.eip.conductor import (EIPConductor, - #EIPNoCommandError) -#from leap.eip.config import (EIPInitBadKeyFilePermError) from leap.eip import exceptions as eip_exceptions from leap.eip.eipconnection import EIPConnection -- cgit v1.2.3