summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-11-05 14:59:30 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-11-05 15:00:20 -0300
commit5ae44d80876aa9c1e60280fbf437ee687d9bc3c8 (patch)
tree54894fdf4a6416e26c726f2c7daa52c2f4bc7ed3
parent104c48b6eb3d6c2a092fae4d50ddd54d0130609b (diff)
Handle Timeout errors during register.
Also catch all request exceptions to avoid failures. [Closes #4358]
-rw-r--r--changes/bug-4358_handle-timeout-during-register1
-rw-r--r--src/leap/bitmask/crypto/srpregister.py3
-rw-r--r--src/leap/bitmask/gui/wizard.py3
3 files changed, 4 insertions, 3 deletions
diff --git a/changes/bug-4358_handle-timeout-during-register b/changes/bug-4358_handle-timeout-during-register
new file mode 100644
index 00000000..04c408f6
--- /dev/null
+++ b/changes/bug-4358_handle-timeout-during-register
@@ -0,0 +1 @@
+- Handle Timeout errors during register process. Closes #4358.
diff --git a/src/leap/bitmask/crypto/srpregister.py b/src/leap/bitmask/crypto/srpregister.py
index 61f1899a..e110df68 100644
--- a/src/leap/bitmask/crypto/srpregister.py
+++ b/src/leap/bitmask/crypto/srpregister.py
@@ -141,8 +141,7 @@ class SRPRegister(QtCore.QObject):
verify=self._provider_config.
get_ca_cert_path())
- except (requests.exceptions.SSLError,
- requests.exceptions.ConnectionError) as exc:
+ except requests.exceptions.RequestExceptions as exc:
logger.error(exc.message)
ok = False
else:
diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py
index e9c1d86c..8de5802e 100644
--- a/src/leap/bitmask/gui/wizard.py
+++ b/src/leap/bitmask/gui/wizard.py
@@ -280,7 +280,8 @@ class Wizard(QtGui.QWizard):
old_username = self._username
self._username = None
self._password = None
- error_msg = self.tr("Unknown error")
+ error_msg = self.tr("Something has gone wrong. "
+ "Please try again.")
try:
content, _ = get_content(req)
json_content = json.loads(content)