summaryrefslogtreecommitdiff
path: root/src/leap/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/gui')
-rw-r--r--src/leap/gui/mainwindow.py3
-rw-r--r--src/leap/gui/wizard.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index ccf97672..b3ab56d3 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -47,6 +47,9 @@ from leap.services.eip.vpnlaunchers import (VPNLauncherException,
from leap.util import __version__ as VERSION
from leap.util.checkerthread import CheckerThread
+if IS_WIN:
+ from leap.platform_init.locks import WindowsLock
+
from ui_mainwindow import Ui_MainWindow
logger = logging.getLogger(__name__)
diff --git a/src/leap/gui/wizard.py b/src/leap/gui/wizard.py
index ad45dd8c..713383a6 100644
--- a/src/leap/gui/wizard.py
+++ b/src/leap/gui/wizard.py
@@ -20,6 +20,7 @@ First run wizard
"""
import os
import logging
+import json
from PySide import QtCore, QtGui
from functools import partial
@@ -28,6 +29,7 @@ from ui_wizard import Ui_Wizard
from leap.config.providerconfig import ProviderConfig
from leap.crypto.srpregister import SRPRegister
from leap.util.privilege_policies import is_missing_policy_permissions
+from leap.util.request_helpers import get_content
from leap.services.eip.providerbootstrapper import ProviderBootstrapper
logger = logging.getLogger(__name__)
@@ -254,7 +256,9 @@ class Wizard(QtGui.QWizard):
self._password = None
error_msg = self.tr("Unknown error")
try:
- error_msg = req.json().get("errors").get("login")[0]
+ content, _ = get_content(req)
+ json_content = json.loads(content)
+ error_msg = json_content.get("errors").get("login")[0]
if not error_msg.istitle():
error_msg = "%s %s" % (old_username, error_msg)
self._set_register_status(error_msg, error=True)