Revert r79131
authorMatthias Klose <doko@ubuntu.com>
Sun, 21 Mar 2010 11:15:45 +0000 (11:15 +0000)
committerMatthias Klose <doko@ubuntu.com>
Sun, 21 Mar 2010 11:15:45 +0000 (11:15 +0000)
  - Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.

Lib/test/test_os.py
Misc/NEWS
Modules/posixmodule.c

index 45f6bd20ee094afcd2eb58ec86b08270bc416010..3cb411beff84fd6868d66d708003e55a1157f72d 100644 (file)
@@ -511,9 +511,6 @@ class URandomTests (unittest.TestCase):
         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")
index 9fd5f0887a52838fac9e6afb6e0dd9c50b46b96f..1fbf7c1cfbce11885ca55a13b56a943057be210f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,8 +15,6 @@ Core and Builtins
 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.
 
index 5add8481b8b098fd3ae86054712cee71121e8d1f..2ed54e4bdbcfa2a2bd058a8880ec359b29bef1e2 100644 (file)
@@ -2979,11 +2979,6 @@ posix_execv(PyObject *self, PyObject *args)
                 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) {