From: Steve Dower Date: Sun, 20 Nov 2016 04:11:56 +0000 (-0800) Subject: Issue #28732: Adds new errors to spawnv emulation for platforms that only have fork... X-Git-Tag: v3.6.0b4~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eccaa0679dfd8f23473b3370b74be4af1b5fec44;p=thirdparty%2FPython%2Fcpython.git Issue #28732: Adds new errors to spawnv emulation for platforms that only have fork and execv --- diff --git a/Lib/os.py b/Lib/os.py index 71ed0885b0ce..a704fb218c3a 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -832,6 +832,10 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"): def _spawnvef(mode, file, args, env, func): # Internal helper; func is the exec*() function to use + if not isinstance(args, (tuple, list)): + raise TypeError('argv must be a tuple or a list') + if not args[0]: + raise ValueError('argv first element cannot be empty') pid = fork() if not pid: # Child