commit | 372b838db50540587f643bf553dc070589fe500b | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Tue Jun 21 17:24:21 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Tue Jun 21 17:24:21 2011 +0200 |
tree | e7eabc07d1c52ffed62001ad85b70e598b3b52e8 | |
parent | 28db0fd3575ebe5f155d4e04fcfaebc33957ae28 [diff] [blame] | |
parent | f1512a2967ac30c38135fb950d623d5fed856494 [diff] [blame] |
(merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy the environment variables, start with an empty environment.
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 @@ # 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: