summaryrefslogtreecommitdiff
path: root/src/leap/baseapp
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-24 02:39:34 +0900
committerkali <kali@leap.se>2013-01-24 02:39:34 +0900
commitfea677bb0e3c9ec43353f644879636b9a63a3634 (patch)
treeb53baf5046ed0bd996967bf5d332fb6f83de1f92 /src/leap/baseapp
parent8226d6032b6db0c15ff70e377f87f4acfdd21787 (diff)
parentff59da55ef9a176b36cef19d67e7ec363bf5d739 (diff)
Merge branch 'feature/fix-connect-page' into develop
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r--src/leap/baseapp/eip.py7
-rw-r--r--src/leap/baseapp/mainwindow.py2
-rw-r--r--src/leap/baseapp/network.py1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py
index 4c1fb32d..2f215f00 100644
--- a/src/leap/baseapp/eip.py
+++ b/src/leap/baseapp/eip.py
@@ -193,21 +193,24 @@ class EIPConductorAppMixin(object):
# connection information via management interface
log = self.conductor.get_log()
error_matrix = [(EVENT_CONNECT_REFUSED, (self.start_or_stopVPN, ))]
- self.network_checker.checker.parse_log_and_react(log, error_matrix)
+ if hasattr(self.network_checker, 'checker'):
+ self.network_checker.checker.parse_log_and_react(log, error_matrix)
@QtCore.pyqtSlot()
- def start_or_stopVPN(self):
+ def start_or_stopVPN(self, **kwargs):
"""
stub for running child process with vpn
"""
if self.conductor.has_errors():
logger.debug('not starting vpn; conductor has errors')
+ return
if self.eip_service_started is False:
try:
self.conductor.connect()
except eip_exceptions.EIPNoCommandError as exc:
+ logger.error('tried to run openvpn but no command is set')
self.triggerEIPError.emit(exc)
except Exception as err:
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py
index b1e5bccf..91b0dc61 100644
--- a/src/leap/baseapp/mainwindow.py
+++ b/src/leap/baseapp/mainwindow.py
@@ -186,4 +186,6 @@ class LeapWindow(QtGui.QMainWindow,
called from the end of wizard
"""
self.show_systray_icon()
+ # this will setup the command
+ self.conductor.run_openvpn_checks()
self.start_or_stopVPN()
diff --git a/src/leap/baseapp/network.py b/src/leap/baseapp/network.py
index d5685504..dc5182a4 100644
--- a/src/leap/baseapp/network.py
+++ b/src/leap/baseapp/network.py
@@ -36,6 +36,7 @@ class NetworkCheckerAppMixin(object):
@QtCore.pyqtSlot(object)
def runNetworkChecks(self):
+ logger.debug('running checks (from NetworkChecker Mixin slot)')
self.network_checker.run_checks()
@QtCore.pyqtSlot(object)