Skip to content

Commit f363baa

Browse files
committed
update missing comments
1 parent c233975 commit f363baa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Modules/posixmodule.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7999,7 +7999,8 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
79997999
if (!temp_buffer) {
80008000
goto exit;
80018001
}
8002-
/* TODO there can be multiple cwd actions .... */
8002+
/* Use a list to capture all directories passed via POSIX_SPAWN_CHDIR
8003+
* action for potential exception creation below. */
80038004
cwd_buffer = PyList_New(0);
80048005
if (!cwd_buffer) {
80058006
goto exit;
@@ -8045,12 +8046,13 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
80458046
* we return an exception with all of those. */
80468047

80478048
if (cwd_size == 1) {
8048-
/* the common case */
80498049
PyObject *cwd = PyList_GET_ITEM(cwd_buffer, 0);
80508050
PyErr_Format(PyExc_FileNotFoundError, "Either '%S' or '%s' doesn't exist.",
80518051
path->object, PyBytes_AS_STRING(cwd));
80528052
} else {
8053-
/* TODO ..... */
8053+
/* Multiple POSIX_SPAWN_CHDIR actions were used in a single
8054+
* spawn. In this case, we have to build the expection message
8055+
* from all possibly missing paths. */
80548056
PyObject *separator = PyBytes_FromString(", ");
80558057
if (!separator) {
80568058
goto exit;

0 commit comments

Comments
 (0)