Fix Python test_repl in MODE=dbg (#412)

This commit is contained in:
Gautham 2022-05-28 18:20:42 +05:30 committed by GitHub
parent de5de19004
commit 909e54510d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View file

@ -124,14 +124,9 @@ Py_FatalError(const char *msg)
}
int has_tstate_and_gil = (tss_tstate != NULL);
if (has_tstate_and_gil) {
/* If an exception is set, print the exception with its traceback */
if (!_Py_FatalError_PrintExc(fd)) {
/* No exception is set, or an exception is set without traceback */
_Py_FatalError_DumpTracebacks(fd);
}
}
else {
/* If an exception is set, print the exception with its traceback */
if (!_Py_FatalError_PrintExc(fd)) {
/* No exception is set, or an exception is set without traceback */
_Py_FatalError_DumpTracebacks(fd);
}