summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 4e74e0b..a173eb3 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -2124,18 +2124,15 @@ Py_FatalError(const char *msg)
void _Py_NO_RETURN
_Py_ExitInitError(_PyInitError err)
{
- assert(_Py_INIT_FAILED(err));
if (_Py_INIT_IS_EXIT(err)) {
-#ifdef MS_WINDOWS
- ExitProcess(err.exitcode);
-#else
exit(err.exitcode);
-#endif
}
- else {
- assert(_Py_INIT_IS_ERROR(err));
+ else if (_Py_INIT_IS_ERROR(err)) {
fatal_error(err._func, err.err_msg, 1);
}
+ else {
+ Py_FatalError("_Py_ExitInitError() must not be called on success");
+ }
}
/* Clean up and exit */