summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-10-18 12:39:50 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2013-10-18 12:39:50 (GMT)
commitac1a2489681d16ecc92985aefbd944e3b70fd26f (patch)
treed72c91f55f04e75bb650f5b9319a5cbbfcc5fc6e /Lib
parentef23f1875d2d69f6de3b58aebcdf34e5072b2871 (diff)
downloadcpython-ac1a2489681d16ecc92985aefbd944e3b70fd26f.zip
cpython-ac1a2489681d16ecc92985aefbd944e3b70fd26f.tar.gz
cpython-ac1a2489681d16ecc92985aefbd944e3b70fd26f.tar.bz2
Close #19284: Handle -R properly in flag helper
Previously, the -R option would be specified multiple times if PYTHONHASHSEED was set.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/subprocess.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 4ce3c92..23c9ea5 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -506,6 +506,8 @@ def _args_from_interpreter_flags():
for flag, opt in flag_opt_map.items():
v = getattr(sys.flags, flag)
if v > 0:
+ if flag == 'hash_randomization':
+ v = 1 # Handle specification of an exact seed
args.append('-' + opt * v)
for opt in sys.warnoptions:
args.append('-W' + opt)