summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-11-08 05:15:27 +0900
committerkali <kali@leap.se>2012-11-08 05:15:27 +0900
commit6a4d0b8298e24968106007fabef16238300742cd (patch)
tree0f6c3c4ccc080a01ac2a24e55458a641d2235aed /src
parentee5928e4e066ac9f72a7dec15972817746dbc058 (diff)
catch conn error while fetching provider info
Diffstat (limited to 'src')
-rw-r--r--src/leap/gui/firstrun/providerinfo.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/leap/gui/firstrun/providerinfo.py b/src/leap/gui/firstrun/providerinfo.py
index 06e00682..9b959602 100644
--- a/src/leap/gui/firstrun/providerinfo.py
+++ b/src/leap/gui/firstrun/providerinfo.py
@@ -177,13 +177,15 @@ class ProviderInfoPage(ValidationPage):
pause_and_finish()
return False
- # try download provider info...
+ ##################################
+ # 3) try download provider info...
+ ##################################
+
update_signal.emit("Downloading provider info", 70)
try:
- eipconfigchecker.fetch_definition(domain=domain)
+ eipconfigchecker.fetch_definition(domain=_domain)
wizard.set_providerconfig(
eipconfigchecker.defaultprovider.config)
- # XXX catch errors...
except requests.exceptions.SSLError:
# XXX we should have catched this before.
# but cert checking is broken.
@@ -192,8 +194,16 @@ class ProviderInfoPage(ValidationPage):
"Could not get info from provider.")
pause_and_finish()
return False
+ except requests.exceptions.ConnectionError:
+ wizard.set_validation_error(
+ prevpage,
+ "Could not download provider info "
+ "(refused conn.).")
+ pause_and_finish()
+ return False
+ # XXX catch more errors...
- # We're done
+ # We're done!
pause_and_finish()
def _do_validation(self):