mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-42308: Add threading.__excepthook__ (GH-23218)
Add threading.__excepthook__ to allow retrieving the original value of threading.excepthook in case it is set to a broken or a different value.
This commit is contained in:
parent
b5cc05bbe6
commit
750c5abf43
5 changed files with 40 additions and 0 deletions
|
@ -1200,6 +1200,10 @@ except ImportError:
|
|||
stderr.flush()
|
||||
|
||||
|
||||
# Original value of threading.excepthook
|
||||
__excepthook__ = excepthook
|
||||
|
||||
|
||||
def _make_invoke_excepthook():
|
||||
# Create a local namespace to ensure that variables remain alive
|
||||
# when _invoke_excepthook() is called, even if it is called late during
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue