Revert r79131
- Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 45f6bd2..3cb411b 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -511,9 +511,6 @@
except NotImplementedError:
pass
- def test_execvpe_with_bad_arglist(self):
- self.assertRaises(ValueError, os.execvpe, 'notepad', [], None)
-
class Win32ErrorTests(unittest.TestCase):
def test_rename(self):
self.assertRaises(WindowsError, os.rename, test_support.TESTFN, test_support.TESTFN+".bak")
diff --git a/Misc/NEWS b/Misc/NEWS
index 9fd5f08..1fbf7c1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,8 +15,6 @@
Library
-------
-- Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.
-
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
with Tcl/Tk-8.5.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 5add848..2ed54e4 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -2979,11 +2979,6 @@
PyMem_Free(path);
return NULL;
}
- if (argc < 1) {
- PyErr_SetString(PyExc_ValueError, "execv() arg 2 must not be empty");
- PyMem_Free(path);
- return NULL;
- }
argvlist = PyMem_NEW(char *, argc+1);
if (argvlist == NULL) {