Fix unhandled exceptions not being printed to stderr on macOS when run from launch services and using prewarming

This commit is contained in:
Kovid Goyal
2022-08-16 15:27:41 +05:30
parent 48a9584688
commit 56f45e8b0f
3 changed files with 12 additions and 1 deletions

View File

@@ -59,8 +59,15 @@ log_error_string(PyObject *self UNUSED, PyObject *args) {
Py_RETURN_NONE;
}
static PyObject*
set_use_os_log(PyObject *self UNUSED, PyObject *args) {
use_os_log = PyObject_IsTrue(args) ? true : false;
Py_RETURN_NONE;
}
static PyMethodDef module_methods[] = {
METHODB(log_error_string, METH_VARARGS),
METHODB(set_use_os_log, METH_O),
{NULL, NULL, 0, NULL} /* Sentinel */
};