[Python-checkins] cpython (3.6): Issue #28732: Adds new errors to spawnv emulation for platforms that only have
steve.dower
python-checkins at python.org
Sat Nov 19 23:12:20 EST 2016
https://hg.python.org/cpython/rev/2e1fb851dfb4
changeset: 105199:2e1fb851dfb4
branch: 3.6
parent: 105197:af78b33704af
user: Steve Dower <steve.dower at microsoft.com>
date: Sat Nov 19 20:11:56 2016 -0800
summary:
Issue #28732: Adds new errors to spawnv emulation for platforms that only have fork and execv
files:
Lib/os.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/os.py b/Lib/os.py
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list