summaryrefslogtreecommitdiff
path: root/src/leap/gui/firstrun/providerinfo.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-11-09 11:21:40 +0900
committerkali <kali@leap.se>2012-11-09 11:21:40 +0900
commit8118056a244ca74d16380ad26a70e3da40e7e401 (patch)
tree4363948d180a667a545807b99b2d3199e30b5950 /src/leap/gui/firstrun/providerinfo.py
parentb84007d8fec8c949ba4ac1d26695c710a210d797 (diff)
connect page merged into regvalidation.
Flow nearly working with fake provider, except for authentication.
Diffstat (limited to 'src/leap/gui/firstrun/providerinfo.py')
-rw-r--r--src/leap/gui/firstrun/providerinfo.py24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/leap/gui/firstrun/providerinfo.py b/src/leap/gui/firstrun/providerinfo.py
index 9b959602..4df477a7 100644
--- a/src/leap/gui/firstrun/providerinfo.py
+++ b/src/leap/gui/firstrun/providerinfo.py
@@ -2,7 +2,6 @@
Provider Info Page, used in First run Wizard
"""
import logging
-import time
from PyQt4 import QtCore
from PyQt4 import QtGui
@@ -14,29 +13,12 @@ from leap.crypto import certs
from leap.eip import exceptions as eipexceptions
from leap.gui.progress import ValidationPage
+from leap.util.web import get_https_domain_and_port
-from leap.gui.constants import APP_LOGO
+from leap.gui.constants import APP_LOGO, pause_for_user
logger = logging.getLogger(__name__)
-GUI_PAUSE_FOR_USER_SECONDS = 1
-pause_for_user = lambda: time.sleep(GUI_PAUSE_FOR_USER_SECONDS)
-
-
-def get_https_domain_and_port(full_domain):
- """
- returns a tuple with domain and port
- from a full_domain string that can
- contain a colon
- """
- domain_split = full_domain.split(':')
- _len = len(domain_split)
- if _len == 1:
- domain, port = full_domain, 443
- if _len == 2:
- domain, port = domain_split
- return domain, port
-
class ProviderInfoPage(ValidationPage):
def __init__(self, parent=None):
@@ -127,7 +109,7 @@ class ProviderInfoPage(ValidationPage):
domain)
except baseexceptions.LeapException as exc:
- logger.debug('exception')
+ logger.error(exc.message)
wizard.set_validation_error(
prevpage, exc.usermessage)
pause_and_finish()