summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-11-20 05:14:37 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-11-20 05:14:37 (GMT)
commit17c27d7c7d2451f7929423c356326b46960ba565 (patch)
tree1576b75332a3fe9b48d5bb650f7daa48b0b40697
parentb8f4c7a779201c267ba12efdfe2ddd1d8774ff16 (diff)
parentbb08db4010a45bcd96f6aaf47dbaed5a1c2b3729 (diff)
downloadcpython-17c27d7c7d2451f7929423c356326b46960ba565.zip
cpython-17c27d7c7d2451f7929423c356326b46960ba565.tar.gz
cpython-17c27d7c7d2451f7929423c356326b46960ba565.tar.bz2
Merge from 3.6
-rw-r--r--Lib/os.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/os.py b/Lib/os.py
index a704fb2..fa06f39 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -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: