summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-22 01:29:41 +0900
committerkali <kali@leap.se>2012-08-22 01:29:41 +0900
commitaf77050ce07ad884a39459a12bf22b74f6a858ab (patch)
treeb36f87b7d395d96e2ccd3d943547b3a8aec1e3fc
parentd908247dcc2cac66d31f081d892a04833206de3b (diff)
clean imports and remove connection base method
-rw-r--r--src/leap/base/connection.py37
-rw-r--r--src/leap/baseapp/mainwindow.py3
2 files changed, 14 insertions, 26 deletions
diff --git a/src/leap/base/connection.py b/src/leap/base/connection.py
index cd0ae56..8cd7843 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 c5bdd8e..bc84443 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