From 5adb36218a96c05034c546c302c1861b4c6e5d46 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 10 Oct 2012 04:34:21 +0900 Subject: add feedback for connection error during signup Closes #724 --- src/leap/gui/firstrunwizard.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/leap/gui') 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 -- cgit v1.2.3