]> granicus.if.org Git - python/commit
bpo-36829: sys.excepthook and sys.unraisablehook flush (GH-13620)
authorVictor Stinner <vstinner@redhat.com>
Tue, 28 May 2019 14:01:17 +0000 (16:01 +0200)
committerGitHub <noreply@github.com>
Tue, 28 May 2019 14:01:17 +0000 (16:01 +0200)
commita85a1d337d26a65036e427341d15e3979f7e9ced
treeb355ad22fb8ca020f6572c48519e2fdf641db47a
parent51ddab8dae056867f3595ab3400bffc93f67c8d4
bpo-36829: sys.excepthook and sys.unraisablehook flush (GH-13620)

sys.excepthook() and sys.unraisablehook() now explicitly flush the
file (usually sys.stderr).

If file.flush() fails, sys.excepthook() silently ignores the error,
whereas sys.unraisablehook() logs the new exception.
Python/errors.c
Python/pythonrun.c