From 5f0c01d60d636a1fd98be083b384d4ebced3177d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 18 Jul 2008 11:48:49 +0200 Subject: [PATCH] Don't display error message when cancelling login for issue180 --- tryton/common/common.py | 2 +- tryton/tryton.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index abdbbe6254..f0e525831a 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -591,7 +591,7 @@ def process_exception(exception, parent, obj='', method='', *args): while True: password = ask(_('Password:'), parent, visibility=False) if password is None: - break + raise Exception('NotLogged') res = rpc.login(rpc._USERNAME, password, rpc._SOCK.host, rpc._SOCK.port, rpc._DATABASE) if res < 0: diff --git a/tryton/tryton.py b/tryton/tryton.py index fe6d761521..37af1acda7 100644 --- a/tryton/tryton.py +++ b/tryton/tryton.py @@ -66,6 +66,10 @@ class TrytonClient(object): def excepthook(exctyp, value, tb): import common + + if str(value) == 'NotLogged': + return + tb_s = reduce(lambda x, y: x+y, traceback.format_exception(exctyp, value, tb)) for path in sys.path: