From: Guido van Rossum Date: Fri, 6 Feb 1998 22:32:08 +0000 (+0000) Subject: Don't store the exception info from an unhandled exception in a thread X-Git-Tag: v1.5.1~843 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40769dd073bdc9c3ceb8082bd080158772e715ec;p=python Don't store the exception info from an unhandled exception in a thread in sys.last_*; it prevents proper calling of destructors of local variables. --- diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c index 214263fc43..51c24d13f5 100644 --- a/Modules/threadmodule.c +++ b/Modules/threadmodule.c @@ -219,7 +219,7 @@ t_bootstrap(boot_raw) PyErr_Clear(); else { fprintf(stderr, "Unhandled exception in thread:\n"); - PyErr_Print(); + PyErr_PrintEx(0); } } else