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

Skip to content

Commit bb08db4

Browse files
committed
Fixes empty tuple case.
1 parent eccaa06 commit bb08db4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ def _spawnvef(mode, file, args, env, func):
834834
# Internal helper; func is the exec*() function to use
835835
if not isinstance(args, (tuple, list)):
836836
raise TypeError('argv must be a tuple or a list')
837-
if not args[0]:
837+
if not args or not args[0]:
838838
raise ValueError('argv first element cannot be empty')
839839
pid = fork()
840840
if not pid:

0 commit comments

Comments
 (0)