From b36b39fc25341902027d32a3a669abd390be9bbc Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 12 Dec 2012 09:17:38 +0900 Subject: progress to connection only if no errors --- src/leap/gui/firstrun/regvalidation.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/leap/gui/firstrun/regvalidation.py') diff --git a/src/leap/gui/firstrun/regvalidation.py b/src/leap/gui/firstrun/regvalidation.py index 0e67834b..aeb98204 100644 --- a/src/leap/gui/firstrun/regvalidation.py +++ b/src/leap/gui/firstrun/regvalidation.py @@ -100,9 +100,12 @@ class RegisterUserValidationPage(ValidationPage): def fetcheipcert(): try: - pCertChecker.download_new_client_cert( + downloaded = pCertChecker.download_new_client_cert( credentials=credentials, verify=verify) + if not downloaded: + logger.error('Could not download client cert.') + return False except auth.SRPAuthenticationError as exc: return self.fail(self.tr( @@ -126,10 +129,11 @@ class RegisterUserValidationPage(ValidationPage): """ # this should be called CONNECT PAGE AGAIN. # here we go! :) - full_domain = self.field('provider_domain') - domain, port = get_https_domain_and_port(full_domain) - _domain = u"%s:%s" % (domain, port) if port != 443 else unicode(domain) - self.run_eip_checks_for_provider_and_connect(_domain) + if self.is_done(): + full_domain = self.field('provider_domain') + domain, port = get_https_domain_and_port(full_domain) + _domain = u"%s:%s" % (domain, port) if port != 443 else unicode(domain) + self.run_eip_checks_for_provider_and_connect(_domain) def run_eip_checks_for_provider_and_connect(self, domain): wizard = self.wizard() -- cgit v1.2.3 From 9d2869d9b9abdcf4e63705e659fa4369137a428e Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 18 Dec 2012 06:12:52 +0900 Subject: added current_page --- src/leap/gui/firstrun/regvalidation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/leap/gui/firstrun/regvalidation.py') diff --git a/src/leap/gui/firstrun/regvalidation.py b/src/leap/gui/firstrun/regvalidation.py index aeb98204..b86583e0 100644 --- a/src/leap/gui/firstrun/regvalidation.py +++ b/src/leap/gui/firstrun/regvalidation.py @@ -29,6 +29,7 @@ class RegisterUserValidationPage(ValidationPage): def __init__(self, parent=None): super(RegisterUserValidationPage, self).__init__(parent) + self.current_page = "signupvalidation" title = "Connecting..." # XXX uh... really? @@ -132,7 +133,8 @@ class RegisterUserValidationPage(ValidationPage): if self.is_done(): full_domain = self.field('provider_domain') domain, port = get_https_domain_and_port(full_domain) - _domain = u"%s:%s" % (domain, port) if port != 443 else unicode(domain) + _domain = u"%s:%s" % ( + domain, port) if port != 443 else unicode(domain) self.run_eip_checks_for_provider_and_connect(_domain) def run_eip_checks_for_provider_and_connect(self, domain): -- cgit v1.2.3