summaryrefslogtreecommitdiff
path: root/src/leap/crypto/srpauth.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/crypto/srpauth.py')
-rw-r--r--src/leap/crypto/srpauth.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/leap/crypto/srpauth.py b/src/leap/crypto/srpauth.py
index 3e47f679..52267b3b 100644
--- a/src/leap/crypto/srpauth.py
+++ b/src/leap/crypto/srpauth.py
@@ -255,9 +255,14 @@ class SRPAuth(QtCore.QObject):
(auth_result.status_code,))
json_content = json.loads(content)
- M2 = json_content.get("M2", None)
- uid = json_content.get("id", None)
- token = json_content.get("token", None)
+
+ try:
+ M2 = json_content.get("M2", None)
+ uid = json_content.get("id", None)
+ token = json_content.get("token", None)
+ except Exception as e:
+ logger.error(e)
+ raise Exception("Something went wrong with the login")
events_signal(proto.CLIENT_UID, content=uid)