summaryrefslogtreecommitdiff
path: root/src/leap/crypto/srpregister.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-04-08 23:44:22 +0900
committerkali <kali@leap.se>2013-04-08 23:44:22 +0900
commit42593d4c6bda51a544a72abc0f935633939dad49 (patch)
tree54e592870377d6a69929c2b7b6c7ac51fca3f7e0 /src/leap/crypto/srpregister.py
parent05fe7f44a899288a8a69b9a46793513b87f8d228 (diff)
Several fixes as per review
Diffstat (limited to 'src/leap/crypto/srpregister.py')
-rw-r--r--src/leap/crypto/srpregister.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/leap/crypto/srpregister.py b/src/leap/crypto/srpregister.py
index dc137aeb..59aaf257 100644
--- a/src/leap/crypto/srpregister.py
+++ b/src/leap/crypto/srpregister.py
@@ -125,6 +125,7 @@ class SRPRegister(QtCore.QObject):
logger.debug("Will try to register user = %s" % (username,))
logger.debug("user_data => %r" % (user_data,))
+ ok = None
try:
req = self._session.post(uri,
data=user_data,
@@ -134,15 +135,12 @@ class SRPRegister(QtCore.QObject):
except requests.exceptions.SSLError as exc:
logger.error("SSLError: %s" % exc.message)
- _ok = False
req = None
-
+ ok = False
else:
- _ok = req.ok
-
- self.registration_finished.emit(_ok, req)
-
- return _ok
+ ok = req.ok
+ self.registration_finished.emit(ok, req)
+ return ok
if __name__ == "__main__":