From 7086f46931fff28476a39d72586816fa9dd23171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 22 Feb 2009 18:33:53 +0100 Subject: [PATCH] Add process_exception in sig_win_new for issue803 --- tryton/gui/main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tryton/gui/main.py b/tryton/gui/main.py index a2fefa88b9..26dfd00979 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -1145,11 +1145,13 @@ class Main(object): def sig_win_new(self, widget=None, menu_type='menu', quiet=True, except_id=False, prefs=None): if not prefs: + args = ('model', 'res.user', 'get_preferences', False, rpc.CONTEXT) try: - prefs = rpc.execute('model', 'res.user', 'get_preferences', - False, rpc.CONTEXT) - except: - return False + prefs = rpc.execute(*args) + except Exception, exception: + prefs = common.process_exception(exception, self.window, *args) + if not prefs: + return False sb_id = self.sb_username.get_context_id('message') self.sb_username.push(sb_id, prefs['status_bar'] or '') sb_id = self.sb_servername.get_context_id('message')