From 4f7ceedb8a7742e52b0436a4160c7c44665a2597 Mon Sep 17 00:00:00 2001 From: Alex Gr?nholm Date: Mon, 8 Sep 2014 06:46:34 +0300 Subject: Added the set_exception_info() and exception_info() methods to Future which provide the missing traceback information on Python 2.x --- concurrent/futures/thread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'concurrent/futures/thread.py') diff --git a/concurrent/futures/thread.py b/concurrent/futures/thread.py index a45959d..930d167 100644 --- a/concurrent/futures/thread.py +++ b/concurrent/futures/thread.py @@ -60,8 +60,8 @@ class _WorkItem(object): try: result = self.fn(*self.args, **self.kwargs) except BaseException: - e = sys.exc_info()[1] - self.future.set_exception(e) + e, tb = sys.exc_info()[1:] + self.future.set_exception_info(e, tb) else: self.future.set_result(result) -- cgit v1.2.1