diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-10-18 22:39:50 +1000 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-10-18 22:39:50 +1000 |
commit | e24cacbf5f774e3485d59ab8cb0d59774835d50f (patch) | |
tree | 5f3c906bf27bb10a676549ca7a8ae2c2dc15fb35 | |
parent | 988ffb8b355da3a5ebc8b2a739b910ce3014a706 (diff) | |
download | cpython-e24cacbf5f774e3485d59ab8cb0d59774835d50f.tar.gz |
Close #19284: Handle -R properly in flag helper
Previously, the -R option would be specified multiple times
if PYTHONHASHSEED was set.
-rw-r--r-- | Lib/subprocess.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 4ce3c929d6..23c9ea515b 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) |