diff options
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 01344db..6dc684b 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -587,6 +587,12 @@ pycore_init_types(void) if (!_PyContext_Init()) { return _Py_INIT_ERR("can't init context"); } + + err = _PyErr_Init(); + if (_Py_INIT_FAILED(err)) { + return err; + } + return _Py_INIT_OK(); } @@ -1462,6 +1468,12 @@ new_interpreter(PyThreadState **tstate_p) return err; } + err = _PyErr_Init(); + if (_Py_INIT_FAILED(err)) { + return err; + } + + /* XXX The following is lax in error checking */ PyObject *modules = PyDict_New(); if (modules == NULL) { |