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