Skip to content

Commit 57b6303

Browse files
committed
Use OSError if file actions fails to initialize
1 parent 3c2c4e8 commit 57b6303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5185,7 +5185,7 @@ os_posix_spawn_impl(PyObject *module, path_t *path, PyObject *argv,
51855185
if (file_actions != NULL && file_actions != Py_None){
51865186
posix_spawn_file_actions_t _file_actions;
51875187
if(posix_spawn_file_actions_init(&_file_actions) != 0){
5188-
PyErr_SetString(PyExc_TypeError,
5188+
PyErr_SetString(PyExc_OSError,
51895189
"Error initializing file actions");
51905190
goto exit;
51915191
}

0 commit comments

Comments
 (0)