From af009064f8affdbcd060ec5c7e7087658f3ff2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 4 Jul 2013 18:24:47 -0300 Subject: Raise SRPAuthenticationError when errcode != 422 too --- src/leap/crypto/srpauth.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/leap') diff --git a/src/leap/crypto/srpauth.py b/src/leap/crypto/srpauth.py index eee8e525..ad1afd4c 100644 --- a/src/leap/crypto/srpauth.py +++ b/src/leap/crypto/srpauth.py @@ -177,6 +177,9 @@ class SRPAuth(QtCore.QObject): if init_session.status_code == 422: raise SRPAuthenticationError(self.tr("Unknown user")) + raise SRPAuthenticationError(self.tr("There was a problem with" + " authentication")) + json_content = json.loads(content) salt = json_content.get("salt", None) B = json_content.get("B", None) -- cgit v1.2.3