From 2b2505683f9dd91b6f2f8aeb1ac0798c975a53d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 19 Jul 2013 11:35:27 -0300 Subject: Workaround segfault when emitting a signal with a None parameter Also, support a response from requests be None in certain places. --- src/leap/gui/wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/leap/gui') diff --git a/src/leap/gui/wizard.py b/src/leap/gui/wizard.py index 5333edeb..2b48fc81 100644 --- a/src/leap/gui/wizard.py +++ b/src/leap/gui/wizard.py @@ -309,8 +309,8 @@ class Wizard(QtGui.QWizard): error_msg = json_content.get("errors").get("login")[0] if not error_msg.istitle(): error_msg = "%s %s" % (old_username, error_msg) - except: - logger.error("Unknown error: %r" % (req.content,)) + except Exception as e: + logger.error("Unknown error: %r" % (e,)) self._set_register_status(error_msg, error=True) self.ui.btnRegister.setEnabled(True) -- cgit v1.2.3