From 76f80bc290ea2e730db144bf7822a3cf9749d0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 19 May 2008 17:14:50 +0200 Subject: [PATCH] Add traceback on bug tracker report for issue19 --- tryton/common/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index f1d7b18f15..ef4350e46f 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -11,6 +11,7 @@ import sys import xmlrpclib import md5 import webbrowser +import traceback _ = gettext.gettext @@ -373,7 +374,10 @@ def send_bugtracker(msg, parent): issue_id = server.create('issue', *['messages=' + str(msg_id), 'nosy=' + str(user), 'title=' + str(title), 'priority=bug']) except Exception, exception: - message(_('Exception:') + '\n' + str(exception), parent, + tb_s = reduce(lambda x, y: x + y, + traceback.format_exception(sys.exc_type, + sys.exc_value, sys.exc_traceback)) + message(_('Exception:') + '\n' + tb_s, parent, msg_type=gtk.MESSAGE_ERROR) def message(msg, parent, msg_type=gtk.MESSAGE_INFO):