summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-21 15:18:38 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-21 15:18:38 (GMT)
commitf1512a2967ac30c38135fb950d623d5fed856494 (patch)
tree03aaf88b18adecd7e97b29d89cd7f659d1264848 /Lib/subprocess.py
parentb7149cad045b0273e2cb104a1f15ff942eab1cf6 (diff)
downloadcpython-f1512a2967ac30c38135fb950d623d5fed856494.zip
cpython-f1512a2967ac30c38135fb950d623d5fed856494.tar.gz
cpython-f1512a2967ac30c38135fb950d623d5fed856494.tar.bz2
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 4bcf159..06285e9 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1169,7 +1169,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: