Fixes empty tuple case.

This commit is contained in:
Steve Dower 2016-11-19 21:14:27 -08:00
parent eccaa0679d
commit bb08db4010
1 changed files with 1 additions and 1 deletions

View File

@ -834,7 +834,7 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"):
# 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]:
if not args or not args[0]:
raise ValueError('argv first element cannot be empty')
pid = fork()
if not pid: