bpo-30602: Fix lastarg in os.spawnve() (#2287) (#2357)

Fix a regression introduced by myself in the commit
526b22657c.
(cherry picked from commit c8d6ab2e25)
This commit is contained in:
Victor Stinner 2017-06-23 15:21:24 +02:00 committed by GitHub
parent c1d5345679
commit c472fb6b27

View file

@ -5189,7 +5189,7 @@ os_spawnve_impl(PyObject *module, int mode, path_t *path, PyObject *argv,
goto fail_1; goto fail_1;
} }
if (i == 0 && !argvlist[0][0]) { if (i == 0 && !argvlist[0][0]) {
lastarg = i; lastarg = i + 1;
PyErr_SetString( PyErr_SetString(
PyExc_ValueError, PyExc_ValueError,
"spawnv() arg 2 first element cannot be empty"); "spawnv() arg 2 first element cannot be empty");