summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-21 15:24:21 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-21 15:24:21 (GMT)
commit372b838db50540587f643bf553dc070589fe500b (patch)
treee7eabc07d1c52ffed62001ad85b70e598b3b52e8 /Lib/subprocess.py
parent28db0fd3575ebe5f155d4e04fcfaebc33957ae28 (diff)
parentf1512a2967ac30c38135fb950d623d5fed856494 (diff)
downloadcpython-372b838db50540587f643bf553dc070589fe500b.zip
cpython-372b838db50540587f643bf553dc070589fe500b.tar.gz
cpython-372b838db50540587f643bf553dc070589fe500b.tar.bz2
(merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy the
environment variables, start with an empty environment.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 49137d4..cfd4c85 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1250,7 +1250,7 @@ class Popen(object):
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
- if env:
+ if env is not None:
env_list = [os.fsencode(k) + b'=' + os.fsencode(v)
for k, v in env.items()]
else: