From b87f7fb782023070f32b0bc26da19cb5f8449c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 Oct 2008 22:18:47 +0200 Subject: [PATCH] Improve exception handling on sig_login --- tryton/gui/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tryton/gui/main.py b/tryton/gui/main.py index 2f0f0ad712..6b00040452 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -356,10 +356,15 @@ class Main(object): except Exception, exception: if exception.args == ('QueryCanceled',): return False - raise + common.process_exception(exception, self.window) + return self.window.present() self.sig_logout(widget, disconnect=False) - log_response = rpc.login(*res) + try: + log_response = rpc.login(*res) + except Exception, exception: + common.process_exception(exception, self.window) + return self.refresh_ssl() if log_response > 0: try: