diff options
author | kali <kali@leap.se> | 2012-10-10 04:34:21 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-10-10 04:34:21 +0900 |
commit | 5adb36218a96c05034c546c302c1861b4c6e5d46 (patch) | |
tree | ca05ab54179a99d18f74e4d3bd88fd481862655f /src/leap/gui | |
parent | 83bff4cad1e4345eb534cef28ea464b0b5a5e2fd (diff) |
add feedback for connection error during signup
Closes #724
Diffstat (limited to 'src/leap/gui')
-rwxr-xr-x | src/leap/gui/firstrunwizard.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/leap/gui/firstrunwizard.py b/src/leap/gui/firstrunwizard.py index abdff7cf..6f2c83ce 100755 --- a/src/leap/gui/firstrunwizard.py +++ b/src/leap/gui/firstrunwizard.py @@ -370,6 +370,15 @@ class RegisterUserPage(QtGui.QWizardPage): """ self.validationMsg.setText("Error connecting to provider (timeout)") + def set_status_connerror(self): + """ + set validation msg to + connection refused + """ + self.validationMsg.setText( + "Error connecting to provider " + "(connection error)") + def set_status_unknown_error(self): """ set validation msg to @@ -413,6 +422,7 @@ class RegisterUserPage(QtGui.QWizardPage): schema="http", provider="springbok", + # debug ----- #provider="localhost", #register_path="timeout", #port=8000 @@ -423,6 +433,11 @@ class RegisterUserPage(QtGui.QWizardPage): self.set_status_timeout() return False + except requests.exceptions.ConnectionError as exc: + logger.error(exc) + self.set_status_connerror() + return False + if ok: return True |