diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-11-20 05:14:27 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-11-20 05:14:27 (GMT) |
commit | bb08db4010a45bcd96f6aaf47dbaed5a1c2b3729 (patch) | |
tree | b7ae328f72fc790772275ca8aa4c4b1b2564b077 | |
parent | eccaa0679dfd8f23473b3370b74be4af1b5fec44 (diff) | |
download | cpython-bb08db4010a45bcd96f6aaf47dbaed5a1c2b3729.zip cpython-bb08db4010a45bcd96f6aaf47dbaed5a1c2b3729.tar.gz cpython-bb08db4010a45bcd96f6aaf47dbaed5a1c2b3729.tar.bz2 |
Fixes empty tuple case.
-rw-r--r-- | Lib/os.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |