diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-06-11 12:09:30 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-06-11 12:09:30 -0300 |
commit | 029b4c2ac07fab41dbed9ab90e04e477938c3c05 (patch) | |
tree | 3edbec9313b48841864a7e50829c0128803bddcd /src/leap/crypto/srpauth.py | |
parent | 3d91da9b320d2dd267b0c1799c25a3e140077666 (diff) |
Merge systray icons
Also, catch a possible problem with the login answer from the
webapp and display a proper message
Diffstat (limited to 'src/leap/crypto/srpauth.py')
-rw-r--r-- | src/leap/crypto/srpauth.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/leap/crypto/srpauth.py b/src/leap/crypto/srpauth.py index 28086279..82525d7f 100644 --- a/src/leap/crypto/srpauth.py +++ b/src/leap/crypto/srpauth.py @@ -254,9 +254,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) |