aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 44d2773acdb..5be15e54db2 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -1241,8 +1241,12 @@ static PyStructSequence_Desc UnraisableHookArgs_desc = {
PyStatus
-_PyErr_InitTypes(void)
+_PyErr_InitTypes(PyInterpreterState *interp)
{
+ if (!_Py_IsMainInterpreter(interp)) {
+ return _PyStatus_OK();
+ }
+
if (UnraisableHookArgsType.tp_name == NULL) {
if (PyStructSequence_InitType2(&UnraisableHookArgsType,
&UnraisableHookArgs_desc) < 0) {