From 104c48b6eb3d6c2a092fae4d50ddd54d0130609b Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 5 Nov 2013 14:10:33 -0300 Subject: Move string encoding to srpregister. --- src/leap/bitmask/gui/wizard.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/leap/bitmask/gui') diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index 6ba65410..e9c1d86c 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -226,9 +226,7 @@ class Wizard(QtGui.QWizard): self._registration_finished) threads.deferToThread( - partial(register.register_user, - username.encode("utf8"), - password.encode("utf8"))) + partial(register.register_user, username, password)) self._username = username self._password = password -- cgit v1.2.3 From 5ae44d80876aa9c1e60280fbf437ee687d9bc3c8 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 5 Nov 2013 14:59:30 -0300 Subject: Handle Timeout errors during register. Also catch all request exceptions to avoid failures. [Closes #4358] --- src/leap/bitmask/gui/wizard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/gui') diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index e9c1d86c..8de5802e 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -280,7 +280,8 @@ class Wizard(QtGui.QWizard): old_username = self._username self._username = None self._password = None - error_msg = self.tr("Unknown error") + error_msg = self.tr("Something has gone wrong. " + "Please try again.") try: content, _ = get_content(req) json_content = json.loads(content) -- cgit v1.2.3