diff options
-rw-r--r-- | changes/bug-2954_fix-mainwindow-show | 1 | ||||
-rw-r--r-- | changes/feature-2921_check-for-no-gateways | 1 | ||||
-rw-r--r-- | src/leap/app.py | 1 | ||||
-rw-r--r-- | src/leap/gui/mainwindow.py | 2 | ||||
-rw-r--r-- | src/leap/services/eip/vpnlaunchers.py | 8 | ||||
-rw-r--r-- | src/leap/services/eip/vpnprocess.py | 2 |
6 files changed, 12 insertions, 3 deletions
diff --git a/changes/bug-2954_fix-mainwindow-show b/changes/bug-2954_fix-mainwindow-show new file mode 100644 index 00000000..28a3b2cd --- /dev/null +++ b/changes/bug-2954_fix-mainwindow-show @@ -0,0 +1 @@ + o Fix Main Window briefly display before the wizard on first start. Closes Bug #2954. diff --git a/changes/feature-2921_check-for-no-gateways b/changes/feature-2921_check-for-no-gateways new file mode 100644 index 00000000..dfd9d2bd --- /dev/null +++ b/changes/feature-2921_check-for-no-gateways @@ -0,0 +1 @@ + o Check if there is no gateway to use and display correct message. Close #2921. diff --git a/src/leap/app.py b/src/leap/app.py index cb9951c1..0ee78310 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -151,7 +151,6 @@ def main(): lambda: twisted_main.quit(app), standalone=standalone, bypass_checks=bypass_checks) - window.show() sigint_window = partial(sigint_handler, window, logger=logger) signal.signal(signal.SIGINT, sigint_window) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 5c85a4ce..0382f334 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -1017,7 +1017,7 @@ class MainWindow(QtGui.QMainWindow): error=True) self._set_eipstatus_off() except VPNLauncherException as e: - self._status_panel.set_gloal_status("%s" % (e,), error=True) + self._status_panel.set_global_status("%s" % (e,), error=True) self._set_eipstatus_off() else: self._already_started_eip = True diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index 570a7893..3cee9bbb 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -324,7 +324,9 @@ class LinuxVPNLauncher(VPNLauncher): look for openvpn in the regular paths and algo in path_prefix/apps/eip/ (in case standalone is set) - Might raise VPNException. + Might raise: + VPNLauncherException, + OpenVPNNotFoundException. :param eipconfig: eip configuration object :type eipconfig: EIPConfig @@ -373,6 +375,10 @@ class LinuxVPNLauncher(VPNLauncher): gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() + if not gateways: + logger.error('No gateway was found!') + raise VPNLauncherException(self.tr('No gateway was found!')) + logger.debug("Using gateways ips: {}".format(', '.join(gateways))) for gw in gateways: diff --git a/src/leap/services/eip/vpnprocess.py b/src/leap/services/eip/vpnprocess.py index 0ec56ae7..cbf554da 100644 --- a/src/leap/services/eip/vpnprocess.py +++ b/src/leap/services/eip/vpnprocess.py @@ -698,6 +698,8 @@ class VPNProcess(protocol.ProcessProtocol, VPNManager): def getCommand(self): """ Gets the vpn command from the aproppriate launcher. + + Might throw: VPNLauncherException, OpenVPNNotFoundException. """ cmd = self._launcher.get_vpn_command( eipconfig=self._eipconfig, |