From cc20fe4e6223c6d7092ba6c4b1bb2cf902e795b3 Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Mon, 7 Mar 2016 15:21:14 +0100 Subject: [PATCH] python3 addon: workaround a bug in traceback This commit re-enables the python3 exception handler for python >= 3.5 without it, no Python3 uncaught exceptions can be detected. See the following Bugzilla bug for more details: https://bugzilla.redhat.com/show_bug.cgi?id=1315228 Signed-off-by: Jakub Filak --- src/hooks/abrt_exception_handler3.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/abrt_exception_handler3.py.in b/src/hooks/abrt_exception_handler3.py.in index f45af86..2800975 100644 --- a/src/hooks/abrt_exception_handler3.py.in +++ b/src/hooks/abrt_exception_handler3.py.in @@ -173,8 +173,8 @@ def handle_exception(etype, value, tb): if tb is not None and etype != IndentationError: tblast = traceback.extract_tb(tb, limit=None) - if len(tblast): - tblast = tblast[len(tblast) - 1] + if tblast: + tblast = tuple(tblast[-1]) extxt = traceback.format_exception_only(etype, value) if tblast and len(tblast) > 3: ll = [] -- 2.5.0