[Python-checkins] cpython: Close #19284: Handle -R properly in flag helper
nick.coghlan
python-checkins at python.org
Fri Oct 18 14:40:21 CEST 2013
http://hg.python.org/cpython/rev/0ba7280545fe
changeset: 86425:0ba7280545fe
user: Nick Coghlan <ncoghlan at gmail.com>
date: Fri Oct 18 22:39:50 2013 +1000
summary:
Close #19284: Handle -R properly in flag helper
Previously, the -R option would be specified multiple times
if PYTHONHASHSEED was set.
files:
Lib/subprocess.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -506,6 +506,8 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list