changeset: 105199:2e1fb851dfb4 branch: 3.6 parent: 105197:af78b33704af user: Steve Dower date: Sat Nov 19 20:11:56 2016 -0800 files: Lib/os.py description: Issue #28732: Adds new errors to spawnv emulation for platforms that only have fork and execv diff -r af78b33704af -r 2e1fb851dfb4 Lib/os.py --- a/Lib/os.py Sat Nov 19 19:17:26 2016 -0800 +++ b/Lib/os.py Sat Nov 19 20:11:56 2016 -0800 @@ -832,6 +832,10 @@ 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