diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-02 15:28:49 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-02 15:28:49 (GMT) |
commit | dba1b40b6064107d63f228fe67a258dd1123b189 (patch) | |
tree | a6ebdf8a8504bb769e622ffb7a5cc85aa2a49652 /Modules/_threadmodule.c | |
parent | 38548ad006ee5df07a680ee06d88e8509cdbe3ea (diff) | |
parent | e900096dc42cd0d590752e00ba3983b4672da806 (diff) | |
download | cpython-dba1b40b6064107d63f228fe67a258dd1123b189.zip cpython-dba1b40b6064107d63f228fe67a258dd1123b189.tar.gz cpython-dba1b40b6064107d63f228fe67a258dd1123b189.tar.bz2 |
merge 3.2
Diffstat (limited to 'Modules/_threadmodule.c')
-rw-r--r-- | Modules/_threadmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index 6e39ca0..8f66cb3 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -1001,14 +1001,17 @@ t_bootstrap(void *boot_raw) PyErr_Clear(); else { PyObject *file; + PyObject *exc, *value, *tb; PySys_WriteStderr( "Unhandled exception in thread started by "); + PyErr_Fetch(&exc, &value, &tb); file = PySys_GetObject("stderr"); if (file != NULL && file != Py_None) PyFile_WriteObject(boot->func, file, 0); else PyObject_Print(boot->func, stderr, 0); PySys_WriteStderr("\n"); + PyErr_Restore(exc, value, tb); PyErr_PrintEx(0); } } |