Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eccaa06

Browse files
committed
Issue #28732: Adds new errors to spawnv emulation for platforms that only have fork and execv
1 parent bce2626 commit eccaa06

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/os.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,10 @@ def fsdecode(filename):
832832

833833
def _spawnvef(mode, file, args, env, func):
834834
# Internal helper; func is the exec*() function to use
835+
if not isinstance(args, (tuple, list)):
836+
raise TypeError('argv must be a tuple or a list')
837+
if not args[0]:
838+
raise ValueError('argv first element cannot be empty')
835839
pid = fork()
836840
if not pid:
837841
# Child

0 commit comments

Comments
 (0)